onizet / html2openxml

Html2OpenXml is a small .Net library that convert simple or advanced HTML to plain OpenXml components. This program has started in 2009, initially to convert user's comments from SharePoint to Word.
MIT License
297 stars 106 forks source link

TableGrid style is not working #107

Closed dhavalgajera closed 2 weeks ago

dhavalgajera commented 2 years ago

Steps to Reproduce:

  1. convert html file with simple table with border=1.
  2. open converted word and apply Table Design Style "TableGrid" and see the difference. Borders are coming as darker one with compared to TableGrid style. but, Default Table Design Style is "TableGrid", which is not getting applicable here.
dhavalgajera commented 2 years ago

Possible fix can be this.

in ProcessTableRow function remove //properties.AddChild(new TableCellSpacing() { Type = TableWidthUnitValues.Dxa, Width = "0" });

ref: https://docs.microsoft.com/en-us/dotnet/api/documentformat.openxml.wordprocessing.tablecellspacing?view=openxml-2.8.1