File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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:
subject: Custom Data format in POI
It's not a secret anymore!