• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with exporting data in excel

 
Neeraj Dhiman
Ranch Hand
Posts: 68
IBM DB2 Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Tim Moores
Bartender
Posts: 2955
46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which API are you using - jExcelApi? Apache POI?
 
Neeraj Dhiman
Ranch Hand
Posts: 68
IBM DB2 Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Posts: 2955
46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 68
IBM DB2 Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes Tim, i am implementing API for excel control.
Thanks for reply.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic