Reputation: 307
Now I am successfully setting the number cell type using POI. For example, #,##0.00
formats as 1,343.23
.
However, when I want to make #,##0.#####
, I get 1343.23000
, here the thousand separator ","
disappeared. How can I show like this 1,343.23000
?
doubleStyle = workbook.createCellStyle();
doubleStyle.setDataFormat(HSSFDataFormat.getBuiltinFormat("#,##0.#####"));
Upvotes: 1
Views: 518
Reputation: 307
doubleStyle = workbook.createCellStyle();
doubleStyle.setDataFormat(workbook.createDataFormat().getFormat("#,##0.#######"));
I had to set my format.
Upvotes: 1