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

Glossary Item Box

ExportRangeToHTML Method


See Also    DLL    Example

Applies To

fpSpread control

Description

Exports the specified range of cells in the sheet to an HTML file.

Syntax

C++

BOOL CSpreadSheet::ExportRangeToHTML(long Col, long Row, long Col2, long Row2, LPCTSTR FileName, BOOL AppendFlag, LPCTSTR LogFile);

Visual Basic

fpSpread.ExportRangeToHTML(ByVal Col As Long, ByVal Row As Long,ByVal Col2 As Long, ByVal Row2 As Long, ByVal FileName As String, ByVal AppendFlag As Boolean, ByVal LogFile As String) As Boolean

Parameters

The following parameters are available:

Parameter Description
Col Column at which to begin range to export
Row Row at which to begin range to export
Col2 Column at which to end range to export
Row2 Row at which to end range to export
FileName Path and file name of HTML file to create
AppendFlag Set to True to append export at the end of an existing file; set to False to overwrite an existing file or to create a new file.
LogFile (Obsolete. Any string provided for this parameter is ignored.)

Remarks

Use this method to export a range of the sheet to an HTML file. The export creates an HTML file that provides the range from the sheet and its data as an HTML table. The tags used to create the HTML table conform to HTML 3.2 (or later) guidelines.

All the cells in the range specified by the Col, Row, Col2, and Row2 parameters are exported to the HTML table, whether the cells contain data or not.

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. To determine the settings you want for the Col, Row, Col2, and Row2 parameters, see Using Column and Row Properties.

By default, HTML files created using Spread or the Spread Designer have the extension .HTM. However, you may use any extension.

Tip: You might want to save to a Spread (.SS8) file in addition to exporting it to HTML so that you can open the Spread (.SS8) file for future modifications.

If you would rather export the entire sheet to an HTML table rather than exporting a range of cells, call the ExportToHTML method.

The following table summarizes the formats to which you can save data from a workbook or sheet:

To Save To . . . Use Method
Binary file (proprietary format) SaveToFile
Tab-delimited file SaveTabFile or SaveTabFileU
Delimited file (offers user-defined delimiters) ExportToTextFile or ExportRangeToTextFile
or ExportToTextFileU or ExportRangeToTextFileU
Excel-formatted file ExportExcelBook or ExportToExcel
HTML file ExportToHTML or ExportRangeToHTML
XML file ExportToXML or ExportRangeToXML
XML buffer ExportToXMLBuffer or ExportRangeToXMLBuffer
An array GetArray

For instructions and more information about exporting HTML files, see Exporting to an HTML File and HTML File Export (online PDF manual). HTML File Export lists and describes the method in which Spread property settings are interpreted in the HTML table created in the exported file.

Return Type

True if successful; otherwise, False.

See Also

Exporting to an HTML File
HTML File Export (online PDF manual)

Sheet property

ExportToHTML method

DLL Correspondence

SSExportRangeToHTML function

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