Spread 8.0 Documentation
SaveExcel2007FileMethod
Support Options
ActiveX Reference > ActiveX Methods > SaveExcel2007FileMethod

Glossary Item Box

SaveExcel2007File Method


See Also    DLL

Applies To

fpSpread control

Description

Exports to the specified xlsx Excel-formatted file.

Syntax

C++

BOOL CSpreadSheet::SaveExcel2007File(LPCTSTR FileName, LPCTSTR Password,SHORT Flags, LPCTSTR LogFileName);

Visual Basic

fpSpread.SaveExcel2007File(ByVal FileName As String, ByVal Password As String, Flags AsSaveExcel2007FileFlagConstants, ByVal LogFileName As String)As Boolean

Parameters

The following parameters are available:

Parameter Description
FileName Path and file name of the xlsx Excel-formatted file to create
Password Password for the file (use null or empty string for no password)
Flags Setting to control exporting options
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 "".

Constant Value Description
SAVEEXCEL2007FILEFLAGCONSTANTS
NONE 0 No flags are set
NOFORMULAS 1 No formulas are saved
DATAONLY 32 Exports data only

Remarks

Use this method to export the contents of the Spread control to an xlsx Excel-formatted file. See the readme for special redistribution requirements for this method.

Use the save flag constants to control what is exported. Refer to the SSOCX.BAS file (VB) or the SSOCX.H file (C++) if you do not want to use the value.

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 the Spread Designer have the extension .XLSX. 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, IsExcel2007File, OpenExcel2007File methods

DLL Correspondence

SSSaveExcel2007File function

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