Importing CSV data type errors

Apologies if this is in the wrong category. My first time using UIPath today. I have been testing import of a csv but am stuck with what seem like data type errors.

I have a ‘CSV read’ that goes into a foreach. The foreach containa a ‘write line’ to test the import is working.

The CSV:
VersionNumber,Submitter,Account,AccLstNme,AccEmail,Perms,SubTime,Id0,RsndrsEml
1,hdfghdfgh,gavin,smith,dfghdfghghgf,Water,12/9/2020 7:35,6,hgfhdfghdfg

I have trying all kind of permutations in setting the variable types but have had no luck.

Error:
Error ERROR Validation Error Compiler error(s) encountered processing expression “AccUser2”.
Value of type ‘System.Data.DataTable’ cannot be converted to ‘Integer’. Main xaml

Error ERROR Validation Error Compiler error(s) encountered processing expression “row(“VersionNumber”)ToString”.
End of expression expected. Main xaml

Can you help point me in the right direction

For one the Index output variable should be an integer, you have a dt variable. Clear that out and try again.

Adding to what Matt_S have mentioned, you are missing dot before ToString inside Write Line activity.
row("VersionNumber")ToString
row("VersionNumber").ToString

Before compiling, hover cursor over the blue exclamation mark. You will get much specific error message.

1 Like

Doh!!! thank you! that worked.

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