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

Free Support Forum - aspose.com

Font style for excel sheet

Hi all,

I need a small help. I want to set style as "Century" for the whole excel sheet1. please help me how i can do this.

Any help is appreciated.

Thanks in advane.



Hi Bertha,
Thanks for considering Aspoe.
Please refer to the following java code for your need.
//Instantiating a Workbook object
Workbook workbook = new Workbook();
//Accessing the first worksheet in the book.
Worksheet sheet1 = workbook.getWorksheets().getSheet(0);
Cells cells = sheet1.getCells();
//Setting the font name to "Century"
Style style = cells.getCell("A1").getStyle();
StyleFlag flag = new StyleFlag();

for(int i = 0; i< 256; i++)
Column column = cells.getColumns().getColumn(i);

//Saving the Excel file in default (that is Excel 2000) format

Thank you.