Leading zero missing in Csv file

Leading zero missing in Csv file

eddie909eddie909 Posts: 31Questions: 6Answers: 0

Hi,

i am using buttons for Excel, Csv and pdf

I have a case where the column value might have some leading zeros such as 0001234.

Do you have any suggestions?

thanks,
- Ed

Answers

  • allanallan Posts: 63,208Questions: 1Answers: 10,415 Site admin

    For CSV it shouldn't be an issue as long as the original data is a string value. For Excel it isn't going to work at the moment as that would be detected as a number and rendered as such.

    If it isn't working for CSV, can you link to a test case showing the issue please.

    Allan

  • eddie909eddie909 Posts: 31Questions: 6Answers: 0

    Hi Allan

    Thanks for getting back to me.

    The data is coming from a a jsp page. In excel it is working correctly but not the csv.

    I created a temporary fixed by adding apostrophe (') before my value.

  • allanallan Posts: 63,208Questions: 1Answers: 10,415 Site admin

    If you view the CSV file in a text Editor are the leading zeros shown there? I'm wondering if it is a spreadsheet viewer that is removing them.

    Allan

This discussion has been closed.