• Post Reply Bookmark Topic Watch Topic
  • New Topic

formatting excel file

 
Hd Desai
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using excel to generate report from my web application which is built in struts framework.

I am facing one problem in Excel.

My report has part no column which will contain number.

Now when there is some data like 007 as part number , excel automatically format it and displays it as 7.

I want data as it is to be printed on report.

Can anybody pls tell me how to format this using Java?

Thnx
 
R K Parulekar
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sejal,
There are some excel api to handle excel files .. not sure how struts does it inteernally...
Hope, there should be some provision to set column property to text or string ...

Ravi..
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by sejal naik:

Now when there is some data like 007 as part number , excel automatically format it and displays it as 7.

Did you try wrapping the value in quotes so Excel would see it as a string?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!