Read csv throwing out of memory exception

Hi devs, pls I have large records in csv file but when I read it, it throws out of memory exception. Any ways to resolve this?regards

have a look here:

1 Like

Should I work with the sample file provided?

you can refer to the solution zip from Yoichi if needed. The provided statement should handle large files as it was confirmed more down in the linked thread

1 Like

Hi ppr, I have seen the code, but I will like to read it as datatable not the count, how do I implement that in streamreader?

can you check following:
Assign Activity
strLines = File.ReadLines(filePath).tolist
strLines is of DataType: List(of string)

What’s datatype strcontent pls

have updated above with some more info

And also:

1 Like

@ppr, I have read the lines using file.ReadLines as specified, but I will need the file as datatable so I used generate datatable but it still throws out of memory exception. Is there something missing so as to prevent this error warning.Regards


Please check the below reference post also.