Read CSV files and add to Empty CSV

CSV files from Folder.xaml (9.8 KB)

> RemoteException wrapping System.NullReferenceException: Object reference not set to an instance of an object. 
>    at UiPath.CSV.Activities.WriteCsvFile.EndExecute(AsyncCodeActivityContext context,
> IAsyncResult result)
>    at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context,
> IAsyncResult result)
>    at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor,
> BookmarkManager bookmarkManager)

Any help would be appreciated :slight_smile:

2 Likes

Hi @Stabbathehut

In Read Csv activity you havent mentioned the Datatable

So that is why it is shown as Null Reference

Check it

Thanks
Ashwin S

1 Like

Hi @Stabbathehut

Your output should look like this.

cheers :smiley:

Happy learning :smiley:

5 Likes

Test.zip (12.1 KB)

I am trying to do it with multiple CSV files. Not sure how to resolve

1 Like

Hi @Stabbathehut

Use String array var=Directory.getFiles(InputFilePath)
use for each item in stringarray var
use read range and pass the item in path
use merge datatable activity
and use write range

Thanks
Ashwin S

1 Like

Hi @AshwinS2

doing so requires an Excel Application Scope where only one workbook can be submitted so not sure how that would work. I already had a string array variable type. if you could send me a walkthrough or provide screenshots in how to resolve the issue that would be great

1 Like

you just need to do these if you have multiples csv
image

Then loop thru it and read the csv.

cheers :smiley:

Happy learning :smiley:

7 Likes

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