Home Discussions Questions & Answers Retaining Leading Zeros in CSV Output

Retaining Leading Zeros in CSV Output

Avatar photoCustomer November 29, 2024 at 11:06 am

Excel is treating my alphanumeric serial numbers as pure numbers when opening CSV output, causing leading zeros to be lost. I need a robust workaround.

Viewing 2 reply threads
  • Author
    Replies
    • Support December 1, 2024 at 2:50 am  

      To prevent Excel’s automated type detection, you must modify your SQL to explicitly format the column as text by prefixing it with an equal sign and enclosing it in double quotes: ‘=”‘ || column_name || ‘”‘ column_alias.

    • Avatar photoCustomer December 1, 2024 at 9:47 am  

      If I apply this modification to my SQL, what happens if I run the report in XLSX format instead of CSV?

    • Support December 2, 2024 at 8:32 pm  

      If the report runs in XLSX output format, Blitz Report automatically removes the =” and ” characters from the data, ensuring the data displays correctly without the formatting characters.

Viewing 2 reply threads
  • You must be logged in to reply to this post.

Login with: