In the code bot tries to read an excel file having 343564 rows but is unable to do because of an error: UiPath Executor has stopped working.
That’s a lot of rows. Which Read Range are you using? You should try the Workbook Read Range, it’s faster.
Thing is when I try to replicate the same in dummy process it can successfully read the sheet but in code when it runs UiPath crashes. @Yoichi Can you please help?
Since you have large amount of data present in your excel use Excel Acitivites and if you are performing any filter, forumula operations then, go with VBA Macros which will work faster.
Regards
Already using excel activities only where read range is causing issues
What is exactly your requirement, according to that I can suggest you some way to stop the excel crash.
Regards
To read data from excel sheet and extract it as datatable
Approach 1:
Since it involves a huge amount of data, I recommend adopting the Excel as DB approach.
This method can significantly improve performance and manageability when dealing with large datasets.
Listed few Benefits of Using Excel as a Database
1.. Improved Performance:
- Reduced Memory Usage: Handling data in chunks ensures lower memory consumption.
- Faster Processing: Process only the needed data, leading to quicker execution times.
2 Flexibility and Power of SQL:
- Advanced Filtering and Aggregation: Utilize SQL’s powerful filtering, sorting, and aggregation capabilities directly on the data.
- Complex Queries: Execute complex SQL queries for advanced data manipulation.
- Scalability:
- Handling Large Datasets: Scales better for large datasets by avoiding memory limitations.
- Asynchronous Processing: Design workflows to process data asynchronously for better scalability.
- Error Handling and Stability:
- Better Error Handling: SQL and OLEDB connections often provide more detailed error messages.
- Stability: Processing smaller datasets reduces the risk of crashes and improves stability.
Dependency required are
- Excel.activities
- Database.activities
Here are some useful references to guide you through the implementation:
- Use Excel as Database in UiPath
- https://medium.com/globant/using-excel-as-a-database-in-uipath-e5206120d4a5
- How to use Excel as a database source in the Database Connect activity
Approach 2 : Chunking Range by Finding First and Last Row Addresses
Step 1: Identify First and Last Row Addresses using below activity:
Step 2: Chunk the Range:
Set up a threshold to define chunk sizes, for example, 100 rows per chunk.
Step 3: Loop and Read Chunked Ranges
Read Data in Chunks within a Loop
- Use a loop to read the data in chunks based on the defined threshold.
- Example:
- 1st iteration: Read range
A1:N100 - 2nd iteration: Read range
A101:N200 - 3rd iteration: Read range
A201:N300 - And so on.
- 1st iteration: Read range
Step 4: Append Data to DataTable
- After reading each chunk, append the data to a master DataTable.
Once the loop completes, the master DataTable will contain the entire dataset.
Hope it helps you out!
