wood burning stoves 2.0*
The moose likes Other Open Source Projects and the fly likes Custom Data format in POI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Custom Data format in POI" Watch "Custom Data format in POI" New topic

Custom Data format in POI

Mehul Mistry
Ranch Hand

Joined: Feb 10, 2006
Posts: 43
Hello All,

I am using POI 3.7 for excel and want to add custom data format to the cell style. The custom type that I am trying to set is date format (dd/mm/yyyy) which is not available in built-in format. There doesn't seem to be any API that can allow setting and retrieving custom date format. All I can do is HSSFDataFormat.getBuiltinFormat(). Is there anyway we can achieve this?

The reason for setting it as cell style is my client want it to be as the data format in the excel. So in the generated .xls file, if he does a right click on the cell containing date, and opens "Format Cells" it should show him as date.

Any help on this will be appreciated. I have been trying this for quite a few days.

I agree. Here's the link: http://aspose.com/file-tools
subject: Custom Data format in POI
Similar Threads
POI issue with writing data to cell in excel sheet
Help with Dataformats in Excel using Apache POI
How to read a Date column from an Excel sheet using Apache POI
How to set width of cells in excel on browser ?
Help with POI 3.6 Excel cell validation