We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

XLSX character formatting not working

The following code works fine in the XLS file but the XLSX file has missing text.

Workbook wb = new Workbook();
Worksheet ws = wb.Worksheets[0];

TextBox t = ws.TextBoxes[ws.TextBoxes.Add(0, 0, 100, 100)];
t.Text = "Hello World!";
t.Characters(2, 5).Font.Color = Color.Red;
wb.Save("output.xls");
wb.Save("output.xlsx");

Using version 7.3.5.0.

Hi,


Thanks for the sample code.

After an initial test, I can notice the issue. The XLS file is fine with updated formatting for specific characters in the text box’s text where as in the XLSX file, the last few characters are missing as you pointed out.

I have logged a ticket with an id “CELLSNET-41355” for your issue. We will look into your issue soon.

Thank you.

Hi,


Please try the new fix/version: Aspose.Cells for .NET v7.3.5.4

We have fixed your issue now.

Thank you.

I tested your fix but there are still problems with missing text in the XLSX file. Please try this code sample:


Workbook wb = new Workbook();
Worksheet ws = wb.Worksheets[0];

TextBox t = ws.TextBoxes[ws.TextBoxes.Add(0, 0, 1000, 1000)];
t.Text = “Red text 1. Plain text 1. Red text 2. Plain text 2.”;
t.Characters(0, 10).Font.Color = Color.Red;
t.Characters(26, 10).Font.Color = Color.Red;

wb.Save(“output.xls”);
wb.Save(“output.xlsx”);

Hi,


Thanks for your feedback.

I did find the issue again using your new code. I have reopened your issue “CELLSNET-41355” again, we will soon look into it to figure it out completely.

Thank you.

The issues you have found earlier (filed as CELLSNET-41355) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Not sure if this update is intended to fix the second example I posted, but this update does not resolve that problem.

Hi,


Yes, the latest version (v7.4.0) only fixes related to your first example (XLSX character formatting not working)

Once we sort out the issue for your second example, we will notify you here.

Thanks,