Issue on converting Excel data into CSV file

activities

#1

Hi All,

When I convert the data from Excel to CSV, date column some of the dates have the leading zero in xlsx, are not showing in csv file. Below is the screenshot for your reference.

Excel Data:
Move Date:
12/05/2018 12:59
11/24/2018 15:35
09/26/2018 09:48

After converting into CSV:
Move Date:
12/5/2018 12:59
11/24/2018 15:35
9/26/2018 9:48

As you can see the leading zeros are not shown in csv file. Can any one please help with the solution.

Regards,
Suds


#2

When excel is converted to csv the leading zeroes are copied too. However the csv file when opened doesn’t show them.You will have to format the csv data to show the leading zeroes.
You can do a recording to format the cells. Below is a link that explains required formatting.

https://answers.microsoft.com/en-us/msoffice/forum/all/keeping-leading-zeros-in-csv-file-format/236e23cb-9a00-4c30-bd2b-267d7a3140ac


#3

@vinutha makes a good point.
Basically, an Excel file doesn’t keep formatting in the actual value, however CSV does. So you need to format the Excel file, then use Save As to save it to a CSV type and all the formatting will be maintained.

To format, I would suggest either using Invoke VBA or Type Into with Alt-key combo and keystrokes. Not sure which is easier, though, because using Cell formats is tricky unless you use the Default ones like here:
image