rvico TRichView Reference | Tables

Export of Tables

Top  Previous  Next

Tables can be exported with document in the following formats:

text (including Unicode),
HTML,
RTF.

Text Export

Tables have the properties:

TextRowSeparator string to write after each row;
TextColSeparator string  to write between cells.

By default, the both of them are equal to CR+LF (#13#10).

MS Word 2000+ saves tables as text in the same way.

You can set TextColSeparator to TAB character (#09), if you wish, but do not forget that there can be CR+LFs inside cells.

RTF

RichView saves tables in RTF according to the MS Word 2000+ standard.

MS Word 2000 introduces many new RTF keywords to store HTML-like formatting. Also, Word 2000 supports nested tables (Word 97 does not). Also, Word 2000  correctly works with non standard colors (Word 97 does not, it converts to the closest of 16 standard colors).

MS Word6/95 does not support row merging; there can be other problems with it.

RichView, like Word 2000, saves tables in RTF using both Word 97 and Word 2000 keywords, so tables may look very different when read by different Words.

For Word 97 keywords, RichView uses sizes of table in document (depends on width of RichView window).

For Word 2000, RichView saves html-style properties like BestWidths of cells (in % or twips).

Although generally RichView tables in Word 2000 look much better than in Word 97, table size in Word 2000 can differs from an original, because of Word 2000's way of processing of html-related properties. For example, it sets widths of cells to exactly the width specified (Cells[r,c].BestWidth), if it was set in pixels (twips). RichView and browsers do not set widths of cells less than required to display all their contents.

You can turn off saving cells' BestWidth for Word2000 by excluding rvtoRTFSaveCellPixelBestWidth from table.Options.

HTML

Some properties can be saved only with CSS (with SaveHTMLEx, or SaveHTML with rvsoForceNonTextCSS in Options parameter). See comments for table properties.

See Also...

RichView methods for saving and loading


RichView © Sergey Tkachenko