I have discovered a problem when using the Textbox.characters method working on Java. Originally, I noticed when I was editting each character font format, there was a problem that after two carriage returns in a row, formatting wasn’t being applied. I wrote a test report to try and demonstrate it but wasn’t successful as I noticed another bug but might be connected. If you use the code below, you’ll notice that the “Plain Text 1” has been removed.
Workbook wb = new Workbook();
Worksheet ws = wb.getWorksheets().get(0);
int tID = ws.getTextBoxes().add(1, 1, 500, 1000);
TextBox t = ws.getTextBoxes().get(tID);
t.setText(“Red text 1. Plain text 1. Red text 2. Plain text 2.”);
If you alternate the two character font color sets to:
You’ll notice that the string gets duplicated oddly.
Thanks for your posting and using Aspose.Cells for Java.
After initial investigation, we were able to replicate your issues. I have attached the screenshot for a reference.
We have logged this issue in our database. We will look into this issue and fix it. Once the issue is resolved or we have some other update for you, we will let you know asap.
This issue has been logged as CELLSJAVA-40462.