Please find below the screenshot for your reference. When I run the process one by one, It works fine but when I execute all processes cumulatively gives an error. It executes process no. 1 successfully but after starting second process, gives an error at read range activity in the second process. Pl. see below the error screenshot.
I am using Read Range from XL Excel Application Scope due to handling of big excel data above 200K. If I use Read Range from Workbook activity, it gives an error “Unexpected Exit Code 0xE0434352”.
It seems like file path you passed to Read Range activity doesn’t hold any value because of that you are getting Object Reference not set to an instance of an object. Please print the File Path using Message Box activity before Read Range activity to check whether it’s display file name or not.
If it throws the same error then some issue with File Path you passed here.
@lakshman : Thanks for your swift response. I actually populated the value of my selected file path using message box. It gives me perfect file path as I used in the process no. 1 and after displaying the correct file path, It gave me an error at Read Range of XL Excel Application Scope. Pl. see below.
@lakshman : No, its not working as advised. Now, my one by one process also not working :((.
Pllllzzzzzzzz help.
Only one process runs and after that on every process it gives an error on XL Excel Read Range “Object reference not set to an instance of an object.”
RemoteException wrapping System.NullReferenceException: Object reference not set to an instance of an object.
at UiPathTeam.XLExcel.Utils.GetCellValue(SharedStringItem SharedStringArray,
List`1 Results,
Int32 PreviousCellNumber,
Cell Cell,
Int32 CurrentCol)
at UiPathTeam.XLExcel.Utils.GetSAXRowArray(OpenXmlReader Reader,
WorkbookPart WorkbookPart,
ExcelRange Range,
SharedStringItem SharedStringArray)
at UiPathTeam.XLExcel.Utils.ReadSAXRange(ExcelRange Range,
String FilePath,
String SheetName,
Boolean addHeaders)
at UiPathTeam.XLExcel.Activities.ReadRange.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance,
ActivityExecutor executor,
BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor,
BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor,
BookmarkManager bookmarkManager,
Location resultLocation)
The error you are getting, as others have stated, is that a variable is null. I would check that you are looking at the correct sheet and that it has data in it.
Could you try putting quotation marks in the Range property of your Read Range, or specifying a starting cell?
Also, what version is your package UiPath.Excel.Activities?
Thanks @william.coulson and @ppr : Actually, I am using excel file of 107 columns and 10,000 rows, a big file. But I observed that the scenario is:
Process No. 1: I want to add 108th column by using “Add Data Column activity” and the values in this 108th column are coming from different excel file using “Lookup Data Table activity”. Successfully loaded the values but the problem is that excel does not save the file automatically. Once I save the file after executing the process and then run the second process which also creates another 109th column, works fine.
So, after saving the file with 108 column, I want to again read the same file with 108 column in the second process. But when I save the file after one process and run the second process, perfectly works fine but If I do not save the file it creates an error i.e., Object reference not set to an instance of an object.
So, pl. guide how to save excel file without opening of it because I want to run all the processes cumulatively not individually one by one.
Because when I do not save the file and read it through another data table variable, It does not read the file with 108 column. I think it stuck in 107 column.