By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,568 Members | 1,194 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,568 IT Pros & Developers. It's quick & easy.

Exporting Data from JSP to Excel

P: 2
Hi,

I am having a problem in exporting a data from jsp to excel.
I am getting the values from a servlet and populating it to a JSP.
And form there i export them to Excel.

The functionality works fine. But the problem is with the exported data.
I am having values with leading zeros. for example:

Patron Code
------------------

000234523
032381934
003842924
05793438

etc.,

i am sending these data as string to Excel.
But these data are not getting as it is in Excel.
The leading zeros are eliminated and the data in excel looks as follows:

Patron Code
------------------
234523
2381934
3842924
5793438

I tried adding '. But the quotes( ' ) is also getting added in the excel.
when i added '. the data in excel looks as follows:


Patron Code
------------------

'000234523'
'032381934'
'003842924'
' 05793438'

Can anyone suggest me a solution for this?
Thanks in advance...



Sridhar
Sep 5 '06 #1
Share this Question
Share on Google+
2 Replies


P: 19
have u tried formatting how u want the numbers to look like in the cells? i think maybe this is more an issue with aethestics.
Sep 5 '06 #2

Banfa
Expert Mod 5K+
P: 8,916
or if you are going to use quotes then use only 1 at the start not 1 at each end.

'000234523

not

'000234523'
Sep 6 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.