Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- https://docs.microsoft.com/en-us/office/troubleshoot/office-developer/automate-excel-from-visual-c
- using namespace Microsoft::Office::Interop::Excel;
- #define Excel Microsoft::Office::Interop::Excel
- ////////////////////////////////////////////////////////////////////
- Excel::Application^ oXL;
- Excel::_Workbook^ oWB;
- Excel::_Worksheet^ oSheet;
- Excel::Range^ oRng;
- oXL = gcnew Excel::Application();
- oXL->Visible = true;
- oWB = (Excel::_Workbook^)(oXL->Workbooks->Add(Type::Missing));
- oSheet = (Excel::_Worksheet^)oWB->ActiveSheet;
- oSheet->Cells[1, 1] = "Lasse";
- oSheet->Cells[1, 2] = "Göran";
- ////////////////////////////////////////////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement