Leading Zeros Stripped from Zips from CSV import in SSConvert



Thank you in advance for your help.

TLDR: When converting from CSV to XLS(X) with SSConvert, leading zeros on zip codes get stripped.  ie: 08401 turns into 8401.

Detail:
I am working on a web application that uses PHP on the backend that allows users to download data as CSV, XLS, or XLSX.  We use PHP to export the data as CSV, then use SSConvert to convert the data to XLS(X).  

This has been generally working alright for us (minus some bumps that we have overcome).  However, we have now hit a snag. 

When we try to convert zip codes with a leading zero (or more than one, such as 00501) the leading zeros get stripped away, which can present major pain when working with the data later.  

Now, I know this isn't an excel display issue because I opened up the resulting xlsx as a zip, then looked at the xml file for the data, and found the leading zero stripped there too.  Additionally, I tried converting from csv -> csv, and the zeros were stripped there too. 

I tried using the both "Gnumeric_Excel:xlsx" and "Gnumeric_Excel:xlsx2" for export, and have been using "Gnumeric_stf:stf_csvtab" for import.  

I tried using "Gnumeric_stf:stf_assistant" because "Text import (configurable)" sounded like it might be what I wanted. But it didn't seem to want to convert (or throw an error), and I couldn't find any documentation on how I would configure it's import. 

I tried refreshing my C skills by pulling down the repo from Github in the hopes I could use the source code for inspiration.  Instead, it reminded me how rusty I am with C, and how unfamiliar I am with the code base.  I managed to see some undocumented command line args, that really don't help me right now. 

Any help would be appreciated.  Thank you!


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]