Hi there,
As the title, I can not append html with a table have a lot of columns (sample table in attachment file)
Please check any issue in here.
Thanks,
Document document = new Document("sample.docx");
Table table = document.Sections[0].Tables[0] as Table;
table.AutoFit(AutoFitBehaviorType.AutoFitToWindow);
document.SaveToFile("output.docx", FileFormat.Docx);
Document doc = new Document();
Section section = doc.AddSection();
Paragraph paragraph = section.AddParagraph();
string htmls = File.ReadAllText("sample.html");
paragraph.AppendHTML(htmls);
Table table = doc.Sections[0].Tables[0] as Table;
PreferredWidth width = new PreferredWidth(WidthType.Percentage, 100);
table.PreferredWidth = width;
doc.SaveToFile("output.docx", FileFormat.Docx);