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

Free Support Forum - aspose.com

Aspose.Cells.FontSetting.Font.IsUnderline missing

In Aspose .Cells 8.3.2.5 the class Aspose.Cells.FontSetting.Font is missing a property “IsUnderline”

For example IsSuperscript and IsBold are available

So I expect IsUnderline to be available as well.


Hi Hristo,


Thank you for contacting Aspose support.

I believe you wish to test if a cell has text with underline, if that is correct, you can use the Font.Underline property and compare it against the FontUnderlineType.None constant as demonstrated below.

If you still require the property of type Boolean on similar lines as of Font.IsBold & Font.IsItalic, we can surely log it as a feature request for product team’s review.

C#

var workbook = new Workbook(“D:/book1.xlsx”);
var cells = workbook.Worksheets[0].Cells;
var style = cells[“A1”].GetStyle();
if (style.Font.Underline != FontUnderlineType.None)
{
Console.WriteLine(“Cell A1 has text with underline”);
}
style = cells[“B1”].GetStyle();
if (style.Font.Underline != FontUnderlineType.None)
{
Console.WriteLine(“Cell B1 has text with underline”);
}

This is perfect,

Thanks a lot and have a great day

Hi,


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.