Spread 8.0 Documentation
SSExportToExcelEx Function
Support Options
DLL Reference > DLL Functions > SSExportToExcelEx Function

Glossary Item Box

SSExportToExcelEx Function


See Also    ActiveX

Applies To

fpSpread DLL control

Description

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

Syntax

C

BOOL SSExportToExcelEx(HWND hWnd, LPCTSTR lpszFileName, LPCTSTR lpszSheetName, LPCTSTR lpszLogFileName, SHORT Flags);

C++

BOOL TSpread::ExportToExcelEx(LPCTSTR lpszFileName, LPCTSTR lpszSheetName, LPCTSTR lpszLogFileName, SHORT Flags);

Parameters

The following parameters are available:

Parameter Description
hWnd Window handle of the fpSpread control
lpszFileName Path and file name of Excel-formatted file to create
lpszSheetName Name of the sheet to create in the file
lpszLogFileName 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 NULL.
Flags Whether to save the formulas to the file

Constants Value Description
SS_EXCELSAVEFLAG_NONE 0 No flags
SS_EXCELSAVEFLAG_NOFORMULAS 1 No formulas

Remarks

This function is applied to the current sheet setting unless you first call the SSSetSheet function to specify the sheet for which you are calling this function.

Use this function to export the sheet to a sheet in an Excel-formatted file. The file to which you export will be in the BIFF8 format, which is the format used by Excel 97, Excel 2000, and Excel 2002. Avoid using characters in the sheet name that Excel considers invalid such as ? / \ * [ ].

When you export the sheet, 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 lpszLogFileName parameter. If you do not specify a path, Spread will place the log file in the current drive and directory.

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

If you want to import an existing Excel-formatted file, call the SSGetExcelSheetList, SSImportExcelSheet, and SSIsExcelFile functions.

Return Value

TRUE if the function completes successfully; FALSE otherwise.

See Also

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

SSGetExcelSheetList, SSImportExcelSheet, SSIsExcelFile, SSSetSheet functions

ActiveX Correspondence

ExportToExcelEx method

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.