Spread 8.0 Documentation
ExportToExcelEx Method
Support Options
ActiveX Reference > ActiveX Methods > ExportToExcelEx Method

Glossary Item Box

ExportToExcelEx Method


See Also    DLL    Example

Applies To

fpSpread control

Description

Exports the sheet to the specified Excel-formatted file.

Syntax

C++

BOOL CSpreadSheet::ExportToExcelEx(LPCTSTR FileName, LPCTSTR SheetName,LPCTSTR LogFileName,SHORT Flags);

Visual Basic

fpSpread.ExportToExcelEx(ByVal FileName As String, ByVal SheetName As String, ByVal LogFileName As String,Flags As ExcelSaveFlagConstants) As Boolean

Parameters

The following parameters are available:

Parameter Description
FileName Path and file name of Excel-formatted file to create
SheetName Name of sheet to save to
LogFileName Path and file name of log file to create
If you do not provide a file name, the export will not create a log file. If you do not want to create a log file, set this parameter to "".
Flags Setting to control whether formulas are exported

Constant Value Description
SS_EXCELSAVEFLAGNONE 0 No flags are set
SS_EXCELSAVEFLAG_NOFORMULAS 1 No formulas are saved

Remarks

Use this method to export the contents of the Spread control to an Excel-formatted file, which does not contain formulas.

This method is called for the current sheet setting unless you first set the Sheet property to specify the sheet with which you want to work. Avoid using characters in the sheet name that Excel considers invalid such as ? / \ * [ ].

When you export, you can choose to have Spread create a log file that details how certain data and cell characteristics are handled during the export. To have Spread create an export log file, specify the path and file name in the LogFileName parameter. If you do not specify a path, Spread will place the log file in the current drive and directory. Use the Flags parameter to specify whether to include formulas.

By default, Excel-formatted files created using Spread or the Spread Designer have the extension .XLS. However, you may use any extension.

Return Type

True if successful; otherwise, False.

See Also

Exporting to an Excel-Formatted File
Excel-Formatted File Import/Export (online PDF manual)

ExportToExcel, GetExcelSheetList, ImportExcelBook, ImportExcelSheet, IsExcelFile methods

DLL Correspondence

SSExportToExcelEx function

Copyright © GrapeCity, inc. All rights reserved.