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

Glossary Item Box

ImportExcelBook Method


See Also    DLL    Example

Applies To

fpSpread control

Description

Imports the specified Excel-formatted file.

Syntax

C++

BOOL CSpreadSheet::ImportExcelBook (LPCTSTR FileName, LPCTSTR LogFileName);

Visual Basic

fpSpread.ImportExcelBook(FileName As String, LogFileName As String) As Boolean

Parameters

The following parameters are available:

Parameter Description
FileName Path and name of the Excel-formatted file
LogFileName Specifies the path and file name of the log file created when Spread imports the workbook
If you do not provide a file name, the import will not create a log file. If you do not want to create a log file, set to "".

Remarks

Use this method to import a workbook from an Excel-formatted file. Spread can only import from Excel-formatted files in BIFF8 format, which is the format used by Excel 97, Excel 2000, and Excel 2002.

When you call the ImportExcelBook method, you can specify to create a log file using the LogFileName parameter. When the ImportExcelBook method is called, the conversion process creates a log file with information about the conversion of the Excel-formatted file.

Caution: Loading an Excel file into the control deletes the data currently in the control. The loaded file overwrites existing data. Also, if your sheet had more columns and rows than the loaded sheet, those columns and rows are removed. For example, if your sheet had 100 columns and rows of data, and the loaded sheet has 50 columns and rows of data, once the new sheet is loaded, the control only has 50 columns and rows.

For instructions and more information about importing Excel-formatted files, see Loading an Excel-Formatted File and Excel-Formatted File Import/Export (online PDF manual). Excel-Formatted File Import/Export includes a list and description of the log message numbers.

Return Type

True if successful; otherwise, False.

See Also

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

ExportToExcel, ImportExcelSheet, IsExcelFile methods

DLL Correspondence

SSImportExcelBook function

Copyright © GrapeCity, inc. All rights reserved.