Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Custom Data format in POI  RSS feed

Mehul Mistry
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!