Hi,
I am trying to generate a Word output from user entered data, and one problem we found out is that when a HTML table has a Caption, it is lost in the MS Word output generated by Aspose.Words.
We are using Aspose.Words version 2.4.2
Please see the following sample code.
public void tableCaptionTest() throws Exception
{
System.out.println("tableCaptionTest");
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
String testHtml = "<p> The following table has a caption.</p>";
builder.insertHtml(testHtml);
String tableTest = "";
tableTest += "<table width=400 border=\"1\">";
tableTest += "<caption>Test Data</caption>";
tableTest += "<tr><td>11.</td></tr>";
tableTest += "<tr><td>1122.</td></tr>";
tableTest += "<tr><td>112233.</td></tr>";
tableTest += "<tr><td>11223344.</td></tr>";
tableTest += "</table></p>";
builder.insertHtml(tableTest);
// Save output document
doc.save("C:/TEMP/test/TableCaptionTest.doc");
}