We are having a problem with using InsertHtml() to insert a
Hi
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thanks for your request. It seems, the problem occurs because there is colspan in some cells in your table. When you convert HTML to DOC and there is table with rowspan or colspan Aspose.Words represents them as merged cells, but each of merged cell contains the same content. I linked your request to the appropriate issue. You will be notified as soon as it is resolved.
As a workaround, you can try using the following code:
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
// Insert HTML
string html = File.ReadAllText(@"Test202\tableProblem.htm");
builder.InsertHtml(html);
//Remove content from merged cells
//Get collection of cells in the docuemnt
NodeCollection cells = doc.GetChildNodes(NodeType.Cell, true);
foreach (Cell cell in cells)
{
//Check whether cell is merged with previouse
if (cell.CellFormat.HorizontalMerge == CellMerge.Previous ||
cell.CellFormat.VerticalMerge == CellMerge.Previous)
{
//Remove content from the cell
cell.RemoveAllChildren();
}
}
// Save output docuemnt
doc.Save(@"Test202\out.doc");
Hope this helps.
Best regards.
Hi, thanks for the quick reply...
The workaround worked for the standalone test document, but when used on our production document (which has the table embedded in an enclosing table cell) it still left a few points of space above and below the text in the rows, which was enough to cause it not to fit in the enclosing table cell. We had to deploy the solution yesterday, so I did not have time to further investigate.
Thanks
Hi
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
It is strange, because the problem does not occur on my side at all. On my side the issue occurs only if I convert the document to PDF.
Best regards.
I have a similar problem. I add the table as HTML (with many rowspan and colspan). I attach a sample file. Following the recommendations I add a table in the following way:
Builder.InsertHtml(sTable);


Hi
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thanks for your request. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is fixed.
Best regards,
Hi,
InsertTable.html - Sample table.

Hi
Thanks for your request. Unfortunately, the issue is still unresolved. You will be notified as soon as it is fixed.
Best regards,
Hello
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thank you for additional information. Yes you are right, this problem is still unresolved. We will be sure to inform you of any developments regarding this problem.
Best regards,
Hi,
Hello
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thanks for your inquiry. Unfortunately, it is difficult to provide you any reliable estimate regarding this problem at the moment. Once our developers review the issue and provide an estimate, I will let you know.
Best regards,
Hi,
Hi
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thanks for your inquiry. Please follow the link to learn how to create table using DocumentBuilder:
Best regards,
Hi,
Hi
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thanks for your request. Please see the following links:
HorizontalMerge
VerticalMerge
Best regards,
The issues you have found earlier (filed as WORDSNET-1739) have been fixed in this .NET update and this Java update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(1)
The issues you have found earlier (filed as WORDSNET-3466) have been fixed in this .NET update and this Java update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.