2

CSV file changes on Save

I have searched through forums and contacted Adobe Business Catalyst (BC) who could not help. Basically BC allows you to export your products as a CSV file, which I did with the intention of adding to it and uploading the changes.

Once downloaded, I opened the CSV file and did quite a few hours work adding attributes etc. (However I did not change the description column on any product).

I saved the file to continue the next day. When I opened the file again I noticed that the CSV file reads the carriage returns in the description columns as a new row and therefore throws all the information out of sync.

I tested downloading the CSV file from BC and not making any changes to any columns. I simply opened the file and saved it again. Again when I opened it the second time, the formatting was all out due to carriage returns within the description column. Excel must add some formatting when it saves it?

Why could the CSV file distinguish the carriage returns were within a cell originally but not again once I saved and re-opened the file?

Is there any way to save the hours of work I have already completed? i.e., is there any way to let excel know that the carriage returns are within a cell and not the end of a row?

BC said as the description column may contain HTML, this may throw the formatting out but it is not their problem.

jonsca
  • 10,218
  • 26
  • 54
  • 62
  • 1
    Could you please share 2-3 rows of your CSV? I think I have workaround, but should test it on real data. – Peter L. Feb 25 '13 at 17:58
  • 1
    In addition to Peter's comment: you should include the actual _text_ content of the rows (not only how it looks in Excel after opening). Open eacjh of the files in (eg) notepad and copy out the first few lines. – Tim Williams Feb 25 '13 at 18:24
  • When you do the save in Excel, are you saving as CSV, or saving as an Excel workbook? – John Y Feb 25 '13 at 22:57
  • It would be interesting to compare the original exported data (that works as expected) with the data saved by Excel (that doesn't work) – Paul Walker Feb 25 '13 at 23:40

1 Answers1

1

You need to enclose the cell contents in double quotes in the CSV file.

Pat
  • 353
  • 1
  • 4
  • 15