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

Free Support Forum - aspose.com

Can we set font size to sheet or work book at a time using aspose cells

Hi All,

can you help me,
can we set font size to MSExcel sheet or Excel work book at a time instead of setting cell by cell or row by row

Hi,


Well, you may get/set the Default style (regarding font attributes) for the whole workbook, see the sample code segment below for your reference:
e.g
Sample code:

Workbook book = new Workbook();
Style defaultStyle = book.getDefaultStyle();
defaultStyle.getFont().setName(“Arial”);
defaultStyle.getFont().setSize(10);
book.setDefaultStyle(defaultStyle);

book.save(“out1.xlsx”);

Hope, this helps a bit.

Thank you.