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

Glossary Item Box

ExportRangeToHTMLEx Method


See Also    DLL    Example

Applies To

fpSpread control

Description

Exports the specified range of cells in the sheet to an HTML file using styles from a CSS file.

Syntax

C++

BOOL CSpreadSheet::ExportRangeToHTMLEx(long Col, long Row, long Col2, long Row2, LPCTSTR FileName, BOOL AppendFlag, LPCTSTR LogFile, LPCTSTR TitleStr, LPCTSTR CSSFile, LPCTSTR TableClass, LPCTSTR TRClass, LPCTSTR TDClass, LPCTSTR THClass);

Visual Basic

fpSpread.ExportRangeToHTMLEx(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, ByVal TitleStr As String,ByVal CSSFile As String, ByVal TableClass As String,ByVal TRClass As String, ByVal TDClass As String,ByVal THClass 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.)
TitleStr Name of title for the HTML page
CSSFile Name of the CSS file
TableClass Class name of the table
TRClass Class name of the tr item
TDClass Class name of the td item
THClass Class name of the th item

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.

This method can use the style settings from a CSS file to format the HTML page. CSS files are used to change the appearance of a web page. TableClass, TRClass, TDClass, and THClass are used to specify the class name of the css style for that particular item.

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 ExportToHTMLEx 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 ExportToHTMLor ExportToHTMLEx 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

SSExportRangeToHTMLEx function

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