1

I'm using jxl to create excel files. I need to set a particular font for date type cells. When I write a text cell it's easy to do:

WritableFont arial10pt = new WritableFont(WritableFont.ARIAL, 10);
    arial = new WritableCellFormat(arial10pt);

But when I create a date cell, using the following code, I don't know how to set a font:

DateFormat customDateFormat = new DateFormat("dd/MM/yyyy");
    WritableCellFormat dateFormat = new WritableCellFormat(customDateFormat);

Thanks for help!

Silvio
  • 123
  • 1
  • 11

1 Answers1

2

This is an old question, but worth an answer should anyone else get here in search of this info:

WritableFont arial10pt = new WritableFont(WritableFont.ARIAL, 10);
arial = new WritableCellFormat(arial10pt);
DateFormat customDateFormat = new DateFormat("dd/MM/yyyy");
WritableCellFormat dateFormat = new WritableCellFormat(arial10pt,customDateFormat);
jmf1205
  • 437
  • 6
  • 23