Cannot read superscript from cell character

Dear Aspose Team,

I want to test if a particular character in a cell is formatted as superscript:

FontSetting setting = cell.Characters(i, 1);

if (setting.Font.IsSuperscript)

This works fine with most Excel files I have tested.

But now there is one file where it does not work. Please see the Excel file attached.

In A1 there is a superscript used but Aspose will always give false, e.g.:

cell.Characters(38,1).Font.IsSuperscript

returns false although it should be true

Aspose.Cells version: 8.3.2.5

Hi Hristo,


Thank you for sharing the sample spreadsheet.

In initial investigation that we have carried out using the latest version of Aspose.Cells for .NET 8.6.0.2, we are able to observe the said problem therefore we have logged this incident in our bug tracking system as CELLSNET-43943. Our product team will further look into the details of this problem and we will keep you updated on the status of correction. We apologize for your inconvenience.

Thanks for the fast reply,

We will look forward of getting the fix.
Have a good day
Regards,
Hristo

Hi Hristo,


Sure, we will keep you posted with updates in this regard. For now the ticket is pending for analysis and is in the queue with other tasks. As soon as we have completed the preliminary analysis of the said behavior, we will be in a better position to comment when we can provide the fix.

Hi again,


Please consider using the following piece of code for your requirement. We will update the property of new FontSetting object generated by Cell.Characters method with future releases

C#

var workbook = new Workbook(“D:/superscript.xlsx”);
var cells = workbook.Worksheets[0].Cells;
var cell = cells[“A1”];
FontSetting[] settings = cell.GetCharacters();
for (int i = 0; i < settings.Length; i++)
{
FontSetting setting = settings[i];
if (setting.Font.IsSuperscript)
{

}
}

Hi,

Thanks for your using Aspose.Cells.

Please download and try the latest fix: Aspose.Cells for .NET v8.6.0.4 and let us know your feedback.

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


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.