The CSV file format for <file> is invalid

excel
csv
activities

#1

I’m using the Read CSV activity (version 2016.2.6273). The workflow was running fine and we were almost ready to deploy to production. Now the run is failing trying to read our configuration.csv file. We have not changed anything. We simply wanted to run one final set of test data through and now can’t get past this error. I know the work-arounds, but why is this error now happening on code that was previously signed off? I have the packages to “Auto Update” - could this have updated on me and now a problem?


#2

we have not launched a new excel package recently, so i doubt that you got updated today but still, can you send me a screenshot like this:


#3


#4

I’ve created a brand new script and any .CSV I get the same error on any I try to open. The new workflow only has the Read CSV activity.


#5

Just wondering but are you using “file.csv” or “file.CSV”. The lower case has caused me problems in the past and now I try to only use upper case in both the file name and the activity.

Don’t know if that will help.

Thanks.


#6

I had .csv, but changed it to .CSV. Worth a try. This has been working for a very long time, just started last night to give this error:


#7

Weird. And you saved the file again to the new extension rather than rename the file?

There was also a post on this forum with same issue and he resolved it by rebooting. haha, worth a try right?

I would also make sure the file is delimitted by comma (Open in Notepad) and doesn’t have any zeroes in blank fields and few other things. You could do some research online too.

Hopefully you get that figured out with UiPath.
Their helpdesk is here https://uipath.zendesk.com/hc/en-us

If it comes down to it you could always use Read Text File, then either process it in string format or Write CSV then read it back again to datatable, but probably not the most ideal.


#8

Strange thing is that this was working since the initial build of the workflow. And, our other workflows use the same approach. The file is a simple comma-delimited text file. This is crazy. I’ll try another reboot.


#9

I’ve indirectly managed to solve the problem. I opened the .CSV file in Excel and saved to a new name (as CSV type). I have no idea why UiPath was unhappy with the previous file. Nothing had changed in that file - timestamps were same. I had tried to do it saving over the previous file name but that never worked. Saving to a new file, renaming to the old name worked.


#10

can i have the sample csv file? the broken one


#11

I’m sorry, two problems. 1) I deleted the old versions, and 2) I could not send it to you without changing the values in the as it had sensitive information, which would alter the aspect of sending you the bad file.


#12

the only activity done in that csv file is reading the content? are there any other users interacting with that file?
have you opened it in notepad++ for example, to modify data in it? maybe changed the encoding ?


#13

Only one process/user accessing at a time. I tried notepad++, wordpad and others. Also tried all types of encoding.


#14

I got the same error but I fixed it by changing the delimitator from comma to semicolon.
image


#15

Hi,

I am getting the same error as mentioned above with CSV files.Do we have any fix for this?


#16

Can you share the csv file? How is it generated?


#17

I had a similar issue and found out that UiPath isn’t able to read the CSV-file if there’s an empty line at the beginning. The read CSV activity works fine after removing the empty lines.

empty_line


#18

We will investigate