Exporting Data from JSP to Excel

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 333sridhar333
    New Member
    • Sep 2006
    • 2

    #1

    Exporting Data from JSP to Excel

    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
  • sanou
    New Member
    • Jul 2006
    • 19

    #2
    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.

    Comment

    • Banfa
      Recognized Expert Expert
      • Feb 2006
      • 9067

      #3
      or if you are going to use quotes then use only 1 at the start not 1 at each end.

      '000234523

      not

      '000234523'

      Comment

      Working...