Table Features Supported on HTML Export

Table

Feature Supported Comment See Also
Nested Tables Yes    
Right To Left Tables Yes    
Table Style Yes When a table style is present, it is converted to direct formatting on save so all formatting is still preserved.

There are plans to export table styles as CSS so they can be properly round-tripped.
 
Conditional Formatting Style Yes    
Table Alignment Yes If the table is inline then it’s exported as a <table> wrapped inside a <div> formatted with text-align style.

This is done so the text does not wrap around the table.
 
Table Indent Yes Exported as margin-left:XXX on the table.  
Allow AutoFit Planned Consider export of such tables with “table-layout:fixed”.  
Default Cell Margins Yes Margins are output on every cell.  
Default Cell Spacing Planned    
Preferred Table Width Yes Fixed width tables are exported as width=XXXpt on <table>.

A table with relative size (per cent) is exported as a per cent width e.g width=100%.
 
Table Shading Yes Only a solid fill color is supported.

Exported as background-color style attribute on all cells in the table.
 
Hidden Planned Hidden table or row is currently exported as collapsed with no content. This can produce the correct output with the exception of a row border present.  

Floating Tables

Floating tables are saved as normal tables. Left, right and center alignment is supported.

Feature Supported Comment See Also
Horizontal Position Planned    
Horizontal Position Relative To Planned    
Vertical Position Planned    
Vertical Position Relative To Planned    
Distance from Text Planned    
Move with Text Planned    
Allow Overlap Floating Tables Planned    

Table Borders

Currently, borders are output on each cell as style attribute border-XXX-style, border-XXX-color etc.

Feature Supported Comment See Also
Table Borders Yes    

Rows

Feature Supported Comment See Also
Allow Break Across Pages Planned    
Repeat as Header Row Yes A table that has heade rows are exported as <thead> and <th> elements. Normal rows exported with <tbody> and <tr> elements.

Tables without header rows are exported as <tr> elements without <tbody>.
 
Height Yes Exported as style attribute height on <tr>  
Height Rule Yes Auto is exported with no height attribute allowing auto-resize.

At least and exact are both exported as height in points.
 

Cells

Feature Supported Comment See Also
Cell Margins Yes Exported as padding-XXX on each cell.  
Borders Yes

Supported except for diagonal borders.

Exported as <td> style attribute border-XXX-style, border-XXX-width etc.

Not all line types are exported. For reference, a few line types supported by Aspose.Words are mentioned below.

CSS - LineStyle

‘solid’ - LineStyle.Single

‘dashed’ - LineStyle.DashSmallGap

‘dotted’ - LineStyle.Dot

‘double’ - LineStyle.Double

‘groove’ - LineStyle.Emboss3D

‘ridge’ - LineStyle.Engrave3D

‘none’ - LineStyle.None

 
Shading Yes Only solid fill is supported.

Exported as “background-color” style attribute on <td>.
 
Wrap Text Planned    
Fit Text Planned    
Preferred Width Yes Exported as style attribute width on cells as either relative (percent) or fixed (points).  
Merged Horizontally Yes Exported as “row-span” attribute on <td>.  
Merged Vertically Yes Exported as “col-span” attribute on <td>.  
Vertical Alignment Yes Exported as “vertical-align” attribute on cell.  
Text Direction Yes Exported as “writing-mode” on style attribute.