Hello,
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);
Key Observations:
- Cells B4:B13 in the attached Workbook are merged and formatted with Vertical Alignment (as shown in the attached
VerticalText.png
screenshot).
- Running the above code under Cells 21.3, should produce a file similar to the attached
VerticalText-v21.3.0.html
file.
- 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
VerticalText-v19.12.0html
file.
- Rendering the HTML output file from Cells 19.12 in a Browser, displays the vertical text correctly.
Environment Details:
- 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.
Thank you!
@oraspose,
This issue is reproduced and logged in our database for further investigation. We will notify you here once any update is ready for sharing in this regard.
This issue is logged as:
CELLSJAVA-43429 - Text with Vertical Text Alignment Disappears in HTML
@oraspose,
Please try our latest version/fix: Aspose.Cells for Java v21.3.8 (attached)
aspose-cells-21.3.8-java.zip (7.3 MB)
Your issue should be fixed now.
The version fix looks very good.
Thank you for fixing this so quickly!
@oraspose,
You are welcome.
The issues you have found earlier (filed as CELLSJAVA-43429) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi
Hello.
It seems there is some change that caused HTML not to be generated correctly now. Cells in some rows are shifted to the right.
Note this does not happen if the merged cells exist in the first column (column “A”), but it happens with table having merged cells in column “B”.
Attached is the zip file containing the following:
- VerticalText_fromColA.xlsx - input template with merged cells in column A
- VerticalText_fromColB.xlsx - input template with merged cells in column B
- VerticalText_fromColA-v23.7.2.html - output HTML generated with Cells 23.7.2
- VerticalText_fromColB-v23.7.2.html - output HTML generated with Cells 23.7.2
- VerticalText_fromColA-v21.9.0.html - for comparison output HTML generated with older version Cells 21.9
- VerticalText_fromColB-v21.9.0.html - same with input template VerticalText_fromColB.xlsx
- VerticalTextAlignment.java - sample test used to produce the HTML.
Thank you.
VerticalTextAlignment.zip (29.1 KB)
@oraspose,
Thanks for the sample files.
We were able to reproduce the issue as you mentioned by using your sample file(s). We found some cells in rows are shifted to the right in Excel to HTML rendering.
We need to evaluate your issue in details. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): CELLSJAVA-45550
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
@oraspose This is to inform you that your issue has been resolved. The fix will be included in an upcoming release (Aspose.Cells v23.9) that we plan to release in the first half of September 2023. You will be notified when the next version is released.
Here is the result generated after fix: output.zip (2.7 KB)
The issues you have found earlier (filed as CELLSJAVA-45550) have been fixed in Aspose.Cells for Java 23.9.