SSExportRangeToHTMLEx Function
Applies To
fpSpread DLL control
Description
Exports the specified range of cells in the sheet to an HTML file using styles from a CSS file.
Syntax
BOOL SSExportRangeToHTMLEx(HWND hWnd, SS_COORD Col, SS_COORD Row, SS_COORD Col2, SS_COORD Row2, LPCTSTR lpszFileName, BOOL bAppendFlag, LPCTSTR lpszLogFile, LPCTSTR lpszTitle, LPCTSTR lpszCssFile, LPCTSTR lpszTableClass, LPCTSTR lpszTableRowClass, LPCTSTR lpszTableDefinitionClass, LPCTSTR lpszTableHeaderClass);
BOOL TSpread::ExportRangeToHTMLEx(SS_COORD Col, SS_COORD Row, SS_COORD Col2, SS_COORD Row2, LPCTSTR lpszFileName, BOOL bAppendFlag, LPCTSTR lpszLogFile, LPCTSTR lpszTitle, LPCTSTR lpszCssFile, LPCTSTR lpszTableClass, LPCTSTR lpszTableRowClass, LPCTSTR lpszTableDefinitionClass, LPCTSTR lpszTableHeaderClass);
Parameters
The following parameters are available:
Parameter | Description |
---|---|
hWnd | Window handle of the fpSpread control |
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 |
lpszFileName | Path and file name of HTML file to create |
bAppendFlag | 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. |
lpszLogFile | (Obsolete. Any string provided for this parameter is ignored.) |
lpszTitle | Title of the HTML page |
lpszCssFile | Name of the CSS file |
lpszTableClass | Class name of the table |
lpszTableRowClass | Class name of the tr item |
lpszTableDefinitionClass | Class name of the td item |
lpszTableHeaderClass | Class name of the th item |
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 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.
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 can use any extension.
Tip: You might want to save your sheet as 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 SSExportToHTML function.
The following table summarizes the formats to which you can save data:
To Save To . . . | Use Function |
---|---|
Binary file (proprietary format) | SSSaveToFile |
Tab-delimited file | SSSaveTabFile or SSSaveTabFileU |
Delimited file (offers user-defined delimiters) | SSExportToTextFile or SSExportRangeToTextFile or SSExportToTextFileU or SSExportRangeToTextFileU |
Excel-formatted file | SSExportExcelBook or SSExportToExcel |
HTML file | SSExportToHTML or SSExportRangeToHTML |
XML file | SSExportToXML or SSExportRangeToXML |
XML buffer | SSExportToXMLBuffer or SSExportRangeToXMLBuffer |
An array | SSGetArray |
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 Value
TRUE if the function completes successfully; FALSE otherwise.
See Also
Exporting to an HTML File
HTML File Export (online PDF manual)
SSExportToHTML, SSSetSheet functions
ActiveX Correspondence
ExportRangeToHTMLEx method