Free Support Forum -

Aspose.Cells.Rows is now obsolete?

I happened to look at the definition of Aspose.Cells.Rows and see the note that said it is now obsolete. What class should I be using instead?

For instance, the code I had just written was:

sheet.Cells.Rows(0).Style.Font.IsBold = True

What should that be now?



I think you are using 4.4.1 or 4.4.2 version, so you may use Cells.ApplyRowStyle() method for your requirement.

Kindly consult the following code:

Workbook wb = new Workbook();
Worksheet sheet = wb.Worksheets[0];
Cells cells = sheet.Cells;
Style stl = wb.Styles[wb.Styles.Add()];
StyleFlag flag = new StyleFlag();
stl.Font.IsBold = true;
flag.FontBold = true;

Thank you.

So if I want to have a single row of the spreadsheet appear bold, I have to use 5 or 6 lines of code?