Text formatted with Vertical Text Alignment disappears when exported to HTML. This is regressive to Aspose Cells version 19.12 - which shows the vertical text correctly when the workbook is exported to HTML.
This behavior can be seen in the latest Aspose Cells for Java version 21.3, the attached
VerticalText.xlsx file and the following Java code:
final String xlFile = [PATH] + "VerticalText.xlsx"; Workbook wb = new Workbook(xlFile); String html = xlFile.replace(".xlsx", "-v" + CellsHelper.getVersion() + ".html"); Files.deleteIfExists(Paths.get(html)); wb.save(html); System.out.println("Successfully created HTML file: " + html);
- Cells B4:B13 in the attached Workbook are merged and formatted with Vertical Alignment (as shown in the attached
- Running the above code under Cells 21.3, should produce a file similar to the attached
- Rendering the HTML output file in a Browser, the Vertical Text from cells B4:B13 disappears. Note the text is technically within the HTML, but it is not rendered because the Top and Left Margin settings are offset beyond the boundaries of the table cell.
- Running the same code under Aspose Cells for Java version 19.12, should produce a file similar to the attached
- Rendering the HTML output file from Cells 19.12 in a Browser, displays the vertical text correctly.
- Aspose Cells for Java 21.3 (for first run)
- Aspose Cells for Java 19.12 (for second run)
- Java version 1.8.0_211
- Windows 10 OS (but also reproducible under Linux).
File description in the
VerticalText.zip (20.3 KB) attachment contains:
- VerticalText.xlsx: Excel workbook to be used by the code above.
- VerticalText.png: Screen shot of the Vertical Text Format applied to the range B4:B13.
- VerticalText-v21.3.0.html: HTML output file produced from the code above under Aspose Cells 21.3.
- VerticalText-v19.12.0.html: HTML output file produced from the code above under Aspose Cells 20.8.