I have a process which need to read from excel and store the data into database.
My issue here, customer is putting unrelated data at 1 of the column at the last rows:1,048,576 but the required information is only until rows 20. It takes a very long time to read all the rows (Read Range Activity). Is there anyway that we can read the Excel until the first row empty?
Current temporary solution is I limit to 200, but it was not a good solution because it will be different in the future.
I don’t think this will work because the issue is at the Read Range activity which it takes long time. This solution is after we retrieve data from the Excel and put into datatable.
Put read range inside the loop and read first N(consider 50) rows and store in DT1 variable.
Filter DT1 to remove empty rows and store resulting value in DT2. Create an additional datatable variable DT which is accessible outside do while and store DT2 data to it.
Have this condition in do while loop: DT2.rows.count = N.
Once bot comes out from the loop, you can have required data in DT datatable.