Free Support Forum - aspose.com

Question about setting style for a row

Just purchased Aspose.Excel. Could you please explain why method 1 does not work, whereas method 2 does work?

Method 1:

// Format first line bold.
sheet.Cells.Rows[0].Style.Font.IsBold = true;

Method 2:

// Format first line bold.
for ( int columnIndex=0; columnIndex<100; ++columnIndex )
{
sheet.Cells[0, columnIndex].Style.Font.IsBold = true;
}

The result of method 1 is that none of the cells are changed to bold font.

Thanks
Uwe

Hi Uwe,

Currently Row style setting only work for those cells without formattings. I will change this method to make it work as MS Excel.

Thank you Smile!