aspose file tools*
The moose likes Other Open Source Projects and the fly likes Problem with exporting data in excel 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 "Problem with exporting data in excel" Watch "Problem with exporting data in excel" New topic
Author

Problem with exporting data in excel

Neeraj Dhiman
Ranch Hand

Joined: Dec 19, 2011
Posts: 66

hi friends,
i have a problem with exporting data in excel by setting content - type Application/vnd.ms-excel.
The problem is when i export number
e.g 112233445566 it auto formatted to 1.12233E+11 (if number of digit is greater than 10) (no doubt by clicking on number actual number appears).

one solution i found is to send number as a text. but problem is the data is not editable after that.

i know i have to format size of the data cell from its default value. but the problem is how, using java code in servlet. or is there any another way.

Thanks in Advance.


Correct Me if i am wrong
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
Which API are you using - jExcelApi? Apache POI?
Neeraj Dhiman
Ranch Hand

Joined: Dec 19, 2011
Posts: 66

hi Tim, Actually i am not using any API. What am i doing i am converting my data to an html in string buffer and export buffer as excel.
i am implementing Apache POI. but mean while is there any way to do it in String buffer.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
Who knows what Excel does during HTML exports. If you want precise control over that, use an API that generates actual Excel files.
Neeraj Dhiman
Ranch Hand

Joined: Dec 19, 2011
Posts: 66

yes Tim, i am implementing API for excel control.
Thanks for reply.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with exporting data in excel