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

Free Support Forum - aspose.com

Aspose.cells � mixed underline

With FontSetting.Font.Underline I can determine the type of underline of a cell

That works fine as long as the whole cell has the same underline type applied

When I mix different underline types in one cell FontSetting.Font.Underline will give wrong results for some characters

Please see the attached Excel-file

In A1 the first character has an underline but Font.Underline returns None


Thanks for your posting and using Aspose.Cells.

Please use the Cell.GetCharacters() method. It will return you FontSettings[] which will serve your purpose.

Please see the following sample code. I have also attached the screenshot that showing the values of FontSettings[] for your reference.

string filePath = @“F:\Shak-Data-RW\Downloads\underline.xlsx”;

Workbook workbook = new Workbook(filePath);

Worksheet worksheet = workbook.Worksheets[0];

Cell cell = worksheet.Cells[“A1”];

FontSetting[] fntSettings = cell.GetCharacters();

Thanks a lot for the proposed solution.

Works perfect.


Thank you for the confirmation. It is good to know that you are up & running again. Please feel free to contact us back in case you need our further assistance with Aspose APIs.