ExportToExcel Method

Exports the grid data to a sheet in an Excel-formatted file.

Syntax

Public Function ExportToExcel(ByVal FileName As String, Optional ByVal ExportRowHeader As Boolean = False, Optional ByVal ExportColumnHeader As Boolean = False) As Boolean

Applies To

Grid Object

Parameters

The following parameters are available:

Parameter Description
FileName Path and name of the Excel file to create.
ExportRowHeader A boolean value that identifies whether to export the row header.
ExportColumnHeader A boolean value that identifies whether to export the column header.

Return Type

True if successful; otherwise, False.

Remarks

The file to which you export will be in the BIFF8 format, which is the format used by Excel 97, Excel 2000, Excel 2002, and Excel 2003.

See Also

SaveFile Method