ComponentOne FlexGrid for WinForms
SaveExcel(C1FlexGridBase,String,String,FileFlags,PrinterSettings) Method

C1.Win.C1FlexGrid Namespace > Extensions Class > SaveExcel Method : SaveExcel(C1FlexGridBase,String,String,FileFlags,PrinterSettings) Method
C1FlexGridBase instance that will be saved.
Name of the file to save, including the path.
Name of the sheet to add to the Excel workbook.
Options to use when saving the file.
System.Drawing.Printing.PrinterSettings to use when saving the file.
Saves the grid contents to a Microsoft Excel (.XLS) file.
Syntax
'Declaration
 
Public Overloads Shared Sub SaveExcel( _
   ByVal grid As C1FlexGridBase, _
   ByVal fileName As String, _
   ByVal sheetName As String, _
   ByVal flags As FileFlags, _
   ByVal ps As PrinterSettings _
) 

Parameters

grid
C1FlexGridBase instance that will be saved.
fileName
Name of the file to save, including the path.
sheetName
Name of the sheet to add to the Excel workbook.
flags
Options to use when saving the file.
ps
System.Drawing.Printing.PrinterSettings to use when saving the file.
Remarks

If the specified file exists, the control will add or replace a single worksheet in it. Existing sheets will be preserved if possible.

The worksheet to add or replace is identified by the sheetName parameter.

If the specified file is in use by another application (usually Excel), the method will fail.

This method does not require Microsoft Excel to be installed on the machine.

See Also

Reference

Extensions Class
Extensions Members
Overload List