MTblExportToHTML
nRet = MTblExportToHTML( hWndTbl, sFile, nHTMLFlags, nExportFlags, nRowFlagsOn, nRowFlagsOff, nColFlagsOn, nColFlagsOff )
Deprecated, this function will no longer be developed and may not work properly anymore!
Exports a table to a HTML file.
Parameters
hWndTbl
Window Handle: Handle of the table
sFile
String: Path/name of the HTML file to create
nHTMLFlags
Number: Optional HTML flags:
MTE_HTML_OPEN_FILE |
Opens the created file |
MTE_HTML_ROW_HEIGHT |
Sets the current row height of the table in the appropriate tags of the HTML file |
nExportFlags
Number: Optional export flags:
MTE_COL_HEADERS |
Exports column headers |
MTE_COLORS |
Exports text and background colors |
MTE_FONTS |
Exports fonts and font enhancements |
MTE_GRID |
Exports grid lines |
MTE_SPLIT_ROWS |
Exports also split rows ( if any ) |
RowFlagsOn
Number: The flags a row should have to be exported
RowFlagsOff
Number: The flags a row should not have to be exported
ColFlagsOn
Number: The flags a column should have to be exported
ColFlagsOff
Number: The flags a column should not have to be exported
Return
Number: 1 if successful or one of the following error codes:
MTE_ERR_FILE |
A file error occured |
MTE_ERR_OPEN |
The created file could not be opened |
MTE_ERR_EXCEPTION |
Another exception occured |
MTE_ERR_NOT_SUBCLASSED |
The table isn't subclassed with MTblSubClass |
Example
In this example all visible rows ( incl. split rows ) and columns of a table are exported to the file "c:\mtbl.htm" with column headers, colors, fonts and grid. The created file is opened:
Set sFile = "c:\\mtbl.htm"
Set nHTMLFlags = MTE_HTML_OPEN_FILE
Set nExportFlags = MTE_COL_HEADERS | MTE_COLORS | MTE_FONTS | MTE_GRID | MTE_SPLIT_ROWS
Set nRowFlagsOn = 0
Set nRowFlagsOff = ROW_Hidden
Set nColFlagsOn = COL_Visible
Set nColFlagsOff = 0
Set nRet = MTblExportToHTML( hWndTbl, sFile, nHTMLFlags, nExportFlags, nRowFlagsOn, nRowFlagsOff, nColFlagsOn, nColFlagsOff )
Remarks
If the file to create already exists it will be overwritten.
Some characters are replaced with the appropriate HTML special character ( e.g. '<' is peplaced with '<' ).
To avoid that for the cells of a column, set the column flag MTBL_COL_FLAG_EXPORT_AS_TEXT.
See also
Exports
Created with the Personal Edition of HelpNDoc: Easily create PDF Help documents