Hi Support Team,
Aspose Cells for Java version: 21.3
When creating a workbook by passing an HTML document to the constructor, any text after a <br>
tag within a <th>
tag is truncated. Text in <td>
tags is parsed correctly.
Workbook workbook = new Workbook("test.html");
workbook.save("test.xlsx");
test.html:
<html>
<head></head>
<body>
<table border="1">
<thead>
<tr>
<th>One line heading</th>
<th>Two line<br>heading</th>
</tr>
</thead>
<tbody>
<tr>
<td>One line data</td>
<td>Two line<br> data</td>
</tr>
<tr>
<td>Two line<br> data</td>
<td>One line data</td>
</tr>
</tbody>
</table>
</body>
</html>
Attached are two images:
- test.html rendered in a browser
- The contents of text.xlsx
html_output_in_browser.jpg (11.2 KB)
generated_xlsx_content.jpg (27.6 KB)
Any advice would be appreciated!