Set Font Size on Excel Sheet Using JExcel APIs.
Previous | Home | Next |
how to set Font Size on Excel Sheet Using JExcel APIs.
For setting the Font size we have to import the jxl.write.WritableFont class.
We can set the font size by using the following code snippet,
WritableFont wfobj=new WritableFont(WritableFont.TIMES, 10, WritableFont.BOLD, false, UnderlineStyle.NO_UNDERLINE,Colour.BLUE);
WritableCellFormat cfobj=new WritableCellFormat(wfobj);
In the above snippet of code we have passed the 10 font size to the constructor of the WritableFont class and after that we have passed the object of the WritableFont to the WritableCellFormat class's constructor.
Previous | Home | Next |