I'd like to take a number, say 123456
, and I'd like to format it as 123,456.00
when exporting to Excel through a Java app. I need it to be treated as a number in order to perform numeric calculations in Excel.
Asked
Active
Viewed 659 times
0

rajah9
- 11,645
- 5
- 44
- 57
-
Are you writing your own export facility or using an existing one like Apache POI? – rajah9 Apr 30 '15 at 15:11
-
using own export facility – Ramakrishna Nimmaraju Apr 30 '15 at 15:12
-
Can you export the number as 123456 and have it formatted later? The commas and decimal points are really syntactic sugar. – rajah9 Apr 30 '15 at 15:18
-
Please see http://stackoverflow.com/questions/9752137/how-to-format-column-to-number-format-in-excel-sheet to tell Excel how to format the numbers. – rajah9 Apr 30 '15 at 15:19
-
My application users want to see 123456 as 123,456.00 and have numeric calculations on the field when it downloaded :) trying for that. – Ramakrishna Nimmaraju Apr 30 '15 at 15:21
-
Can you suggest how that can be done using Apache POI? – Ramakrishna Nimmaraju Apr 30 '15 at 15:25
1 Answers
0
Welcome to Stackoverflow.
I would suggest that you implement this using a well known Excel API, Apache POI. Here is the Getting Started page.
If you want to format your numeric cell with commas, please see this section of the Quick Guide.

rajah9
- 11,645
- 5
- 44
- 57
-
Thank you so much rajah!. Quick Guide helped and I could complete the task. – Ramakrishna Nimmaraju May 01 '15 at 09:17