• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

formatting excel file

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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..
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
reply
    Bookmark Topic Watch Topic
  • New Topic