preserve the leading zeroes while exproting data from jsp to excel

  • Thread starter Thread starter mihirdm
  • Start date Start date
M

mihirdm

i am able to send all the data from jsp to excel without any problems
except for some numbers where the leading zeroes disappear. one way is
to pass a apostrophe along with the dat but then that apostrophe
appears along with the data which i would like to erase.i would like to
preserve the data without it. any other way. please help at the
earliest. thanks.
 
It depends.
If these really are numbers but you just want them to be formatted with
leading zeros, import the data as now and apply a suitable format to those
cells e.g. "00000". That way Excel maintains them as numbers and calculation
etc work correctly.
However, if they are not number as such (say ID codes, SSN, barcodes, etc),
then export them from jsp as text, surrounded by "".

NickHK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top