Handling Large Excel Files in Flowchart

Hi All,

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”.

image

Many thanks & kind regards,

@Dr_Raza_Abidi_PhD

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.

often an indicator of massive data, missing resources like RAM…

Good you already used:

@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.

@Dr_Raza_Abidi_PhD

Is Sheet named Sheet exists in your Excel file ? Also pass range as “A1” and then check once.

@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.”

we explored that the message means that resulting datatable / internal received things are null.

Split Excel to smaller junks and find out on which row count threshold it is breaking

@ppr : Below are the screenshot from Debugging window and I found below error in exception window. Pl guide.

Name: “Read range”,
Id: “1.91”,
InstanceId: “13”,
TypeName: “UiPathTeam.XLExcel.Activities.ReadRange”

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)

Hi @Dr_Raza_Abidi_PhD,

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?

let us know the more detail steps. Was a split or the full large excel sent to read range.

Please keep in mind

thats why we want to check out if. eg. excel is damaged … In such cases we get the same exceptions

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:

  1. 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.

  2. 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.

Many thanks,

@Dr_Raza_Abidi_PhD Give a try with the below steps:

  • Go the variable that you passed as an output for Read Range activity (Variable of type should be data table)
  • Pass this New System.Data.DataTable in the default value and execute once

@Dr_Raza_Abidi_PhD

We have an option called Save File in Excel Application Scope activity itself only to save the file.

1 Like