Finally, add the following code to save and load the Excel workbook. This code should be added after the code from Step 3 of 4 within the Form_Load event.
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
C1XLBook1.Save("c:\mybook.xls") |
To write code in C#
C# |
Copy Code
|
---|---|
c1XLBook1.Save(@"c:\mybook.xls"); System.Diagnostics.Process.Start(@"c:\mybook.xls"); |
Formatted content is added to the workbook.
Congratulations! You've completed the Excel for .NET quick start.