Loading CSV files into SQL

Hello,

I’m trying to loop through a Folder of CSV files and load the data into SQL. The files variable is set to an array of string. I’m getting errors inside the Read CSV activity “Cannot be converted to String”

If I adjust the variable to files.ToString I get this error:
“Read CSV: Could not find file 'C:\Users\tmullady\Desktop\files\System.String”)"

image

Any help would be greatly appreciated.

Thanks,

Tim

Hi @timothy.mullady

It’s already in For Each, So you need to put Item instead of files

Hope this may help you

Thanks,
Srini

thanks, Now I’m getting this error:
Read CSV: A column named ‘Result’ already belongs to this Data Table.

image

HI @timothy.mullady

Can you check if there is Duplicate Result Header in the Sheet?
OR Have you created any Build Datatable and given the column Names

Thanks,
Srini

I see some redundant column names in csv files. Maybe this is causing the issue

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.