I have a bot using classic activities that worked fine for months. then all of a sudden last week i am getting the following errors on the Excel read range.
UiPath with out warning is pushing me to use modern activities. i am DOD and its my understanding that we are about 1 1/2 to 2 years behind everyone else because of approvals.
im now testing modern excel read range and nothing is happening. when the bot gets to read range its just freezes. The bot never fails and never reads the range. any advice on how to get these modern activity for read range to work?
Can yolu try with Workbook Read range activity or Excel scope appliaction activity?
They aren’t pushing you to do anything. They didn’t make this error happen. Aside from that, you should be using modern activities anyway.
Not sure why you have Create if not exists checked. Wouldn’t you want it to error if the source Excel file doesn’t exist, rather than creating a blank Excel file?
Same for Visible rows only. Do you have hidden rows you don’t want it to read?
As for the original error, is the Excel file large? Was Excel recently upgraded? Could be if you upgraded Excel the older activities won’t work with the new version of Excel. If it was working and now it isn’t, you have to identify what changed in your environment.
Could you please un check the create if not exists because if the file is not exists it will create new excel file and the default sheet name is sheet 1 so bot couldn’t read your given sheet name.
Could you try this below expression kindly refer image
Unchecking “Create if not exists” and changing the sheet name to Sheet1 isn’t going to work. They need to read the sheet named CUI-Timesheet Activity Type Dis.
However, @Waterfowl_Waterfowl_hunte I just noticed you don’t have the .Range part of your range set. You just have the sheet name. Add .Range(“A1”) to it, or whatever the starting sheet should be.
Thank you to all for your input. I went back to my main bot. After playing more i discovered that I can no longer leave the range as (“”) meaning to pull in the entire spread sheet. When change the range to (“A1:W1000”) the bot ran as it used to.
Below range is wide open (“”)
Below Range is fixed (“A1:W1000”). i am now pulling in data to a data table
Any idea why all of a sudden i cant leave the range wide open (“”)?
Try without giving any value even inverted commas to be removed and check the same
Also if only read is needed try the same with workbook activities as well
Also leaving blank range may take sometimes yet times because of the huge file
i have seen similar error when the excel file is very large, the computer RAM gets nearly full and the job is stopped.
as you can see that code is able to read when you give defined range to read so the amount of data is fixed, but in case of no input range bot tries to search for last data cell range and then extract from the found range.
possible solution that you can try:
- Check the input excel file , if it has some random data added at some very distant cells (which is causing the bot to create a very large range when you have not entered any defined range)
- If your data is really big, then use excel as db (How To Use Excel As Database - In UiPath - ExcelCult) and try to use sql to do some calculation and data filtering at sql section and take out only required field and rows into UiPath datatable
- read the excel file in chunks of range - get the last cell locations and then use a looping logic to read 100 rows at a time till you reach last row, and finally merge into a final datatabls
Just set the range to the starting cell ie “A1” or wherever your data starts. It’ll load the whole sheet and all columns, starting from that cell.
Sometimes this can happen. Could you please check the size of the Excel file? If the size is large, we might expect this error. If you want to read this file, try using the Read CSV activity to check if the bot is able to read the data.
If the file size is smaller, you can leave the range empty in the Read Range activity, allowing it to read all the data. You can then filter the data afterwards. It’s a simpler approach rather than trying to filter the range in the Read Range activity, especially if it’s not working as expected.