This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JSP and the fly likes formatting excel file Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "formatting excel file" Watch "formatting excel file" New topic
Author

formatting excel file

Hd Desai
Ranch Hand

Joined: Aug 04, 2003
Posts: 65
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

Joined: May 29, 2005
Posts: 66
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..


"A wish changes nothing. A decision changes everything." - Unknown
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

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?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
jQuery in Action, 2nd edition
 
subject: formatting excel file
 
Similar Threads
IReports
Excel-format report
cell formatting in excel using jsp
Help with Dataformats in Excel using Apache POI
Formatting CSV Files using java??