For my process, I need to read lines from an excel file, filter it, then append it to another excel file.
However, the excel files I’m working with have >100,000 lines, which causes UiPath to crash when it gets to Read/Append Range.
I am trying to split the Read and Append activities into 20,000 line chunks to prevent crashing.
But when I split the Read Range, only the first Read Range will have the headers, subsequent Read Ranges won’t have headers.
Does anything have a good way to do this?
@in006, Take your first 20,000 line datatable’s variable say dt. Now use dt.Clone in assign activity for rest of the excel that has only headers where lines can be added.
Your use seems correct.
A rarely explicitly mentioned thing is that ReadXXX activities return a new DataTable, no matter if the one you passed was already initialized.
So if you need to work on ranges, there are a couple of things you might try:
Ignore column names and go with indexes. Probably switching to LINQ would make it easier than trying to fit .Select into it.
Add column names from a template after each read.
Something like this - ReaddColumnNames.xaml (10.5 KB)
Combine above into both. Depends on how you want it to work.
Point 2 will probably be easiest, especially since you already have the range incrementation done as you said (I’ve added a basic example of that for benefit of other users).
Could anybody shed some light if the reading excel in chunks could be done using UiPath or should it be done using custom code? If it could be done using Uipath, could you please share a sample workflow? Your help will be greatly appreciated.