Set Different type of Font on Excel Sheet Using JExcel APIs.
Previous | Home | Next |
To set the Different types of Font on Excel Sheet Using JExcel APIs.
To set different types of font on Excel sheet we have to import jxl.WritableFont class, through which we can set different types of fonts in an excel worksheet.
WritableFont wfobj=new WritableFont(WritableFont.TIMES, 10, WritableFont.BOLD, false, UnderlineStyle.NO_UNDERLINE,Colour.BLUE);
WritableCellFormat cfobj=new WritableCellFormat(wfobj);
In the above written code snippet we have passed the parameter WritableFont.Times which sets the font
of the cell as Times types, then we passes the object of WritableFont to the constructor of the WritableCellFormat.
Previous | Home | Next |