Hi Support Team,
Aspose Cells for Java version: 21.5.5
When creating a workbook by passing an HTML document to the constructor, any text within <sup>
or <sub>
tags within a table does not appear as a superscript or subscript.
Additionally, the text size for the complete string appears to be smaller, rather than just for the superscript or subscript text.
Workbook workbook = new Workbook("test.html");
workbook.save("test.xlsx");
test.html:
<html>
<head></head>
<body>
<table border="1">
<thead>
<tr>
<th>Volume (m<sup>3</sup>)</th>
<th>Area (m<sup>2</sup>)</th>
<th>CO<sub>2</sub></th>
</tr>
</thead>
<tbody>
<tr>
<td>Volume (m<sup>3</sup>)</td>
<td>Area (m<sup>2</sup>)</td>
<td>CO<sub>2</sub></td>
</tr>
<tr>
<td>Volume (m3)</td>
<td>Area (m2)</td>
<td>CO2</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 (10.0 KB)
generated_xlsx_content.jpg (25.8 KB)
Any advice would be appreciated!