
Originally Posted by
GAM
Hi MC
Yeah, I looked into the code and can't see anywhere that is playing with the dates so it must be one of those Excel side-effects ;) My 'good' method for using Excel is:
1. Ensure all fields/columns are formatted correctly e.g., YYYY-MM-DD for dates, decimal places for monetary values, etc.
2. Save As .csv
3. Delete surrounding cells (Excel likes to put in trailing records)
4. Open .csv in Notepad++
5. 'Convert to UTF-8'
6. Save or Save As xxx_.csv
7. Upload
8. Import ...and notice everything in order and as expected i.e., correct dates, correct values, special characters intact and displayed as expected, etc.
This process seems flawless apart from remembering the open/convert step in Notepad++, which is a pain in the rear... especially if I forget. ;)
Although the macro does not appear to change the dates, it does seem to be allowing Excel to do its usual thing of being 'clever' for us... and changing the dates to system defaults.
On a side note, although I didn't notice any issues with special characters when I was testing the macro with one particular file, I have since seen character errors in my full products download that I hadn't noticed before, so I'm not sure if the macro/EP4 combo had other flaws or if these character issues are from a previous upload/testing task.
For the time being I'm sticking with the trusty Excel .csv/Notepad++ method.
Cheers
GAM
Bookmarks