0

I am able to import my .csv file using Apex Data Loader. When I try importing the same file from CLI I am getting an exception attached in the file. When the file contents are copied into a new csv file and try importing this new .csv file, this succeeds. Also If I open my .csv file, click on save, a pop-up comes up "MyFile.csv may contain features that are not compatible with CSV(Comma Delimited). Do you want to keep the workbook in this format? " And if I click on "Yes" or "No"and close the file without saving it and then try to upload the same file. The data gets uploaded. This is something weird and I am not able to get any logic out of it..

This is the error msg i am getting. enter image description here

1

Since you don't save your CSV file during your open/close trick, my assumption is that the CSV file stays bitwise identical and therefore consequently is not the reason for your problem at all.

It looks more like one of these weird java issues (configuration, memory, etc)

You should try the same on a different computer or in a VM.

An other idea would be to check that the csv is not open (eg. by Excel) when you try it the first time. Open file handles my lead to trouble.

Instead of using dataloader cli you might also consider to have a look at TalenD: http://www.talend.com

1

When you open a CSV file in Excel and click on save, the "Yes" will save the file as CSV again and "No" will prompt you to save the file as XLSX. Excel does save on this "Yes" even though closing the file will prompt you to save again.

Therefore, based on your description, you did save the CSV with Excel, and that will change the formatting of the file contents.

Start over and open your original file with Excel and choose SaveAs to save the file as CSV with a new name.

Use an editor like notepad++, not notepad, and open both files. You will likely see formatting differences between the files like missing double quotes, changed line terminations, etc. Based on what you find, you can change the formatting on the initial file and it will probably work.

If formatting isn't the problem, you may need to look for other issues like extra double quotes inside quoted text fields, for one example.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.