Page 1 of 1

Leading zeros in "Export to Excel" option

Posted: Wed Sep 13, 2017 11:52 am
by venky2903
HI

I am generating the CSV export using "Export to Excel" option. I have an item filed in the grid.
if can be a number "00005543" or combination of numeric and chars like "0876786EBBB'.
in the xl for "00005543" we are getting data as 5543 . truncating the leading zeros.
but if it is combination the data is populating the data as expected."0876786EBBB'

is there any way to get the data with leading Zeros.
it is working fine with xlsx export problem with CSV export

Thanks inadvance.

Re: Leading zeros in "Export to Excel" option

Posted: Thu Sep 14, 2017 10:45 am
by matt.denninghoff
If you open the CSV file with a text editor, such as Notepad, are the leading zeros still there?

If the zeros are in the raw CSV text, then the problem is how Excel interprets the data, not with how the grid exports it. A main reason we implemented the XLSX export was to address the problem of Excel hiding the leading zeros. There is also a configuration option available that retroactively sets all grids to use XLSX export instead of CSV export: http://www.profoundlogic.com/docs/displ ... ports+XLSX . That may be useful if you don't want to go back and change all grids to use xlsx export instead of csv.