Error object reference, looping from second excel sheet onwards

I have attached my workflow as its easier, would like to seek guidance on two issues:

  1. Currently encountering the ‘object reference not set to an instance of an object’ error within my ‘for each row’ of transposing activity(transposing so that i can find a match between two workbooks thereafter).
  2. For looping of each excel sheet activity, would it be possible to always skip the first sheet in every workbook? Or alternatively, implementing a wildcard so that the activity only goes through all sheets that begin with a ‘C’? If so how do I go about doing that!

fyi; For my automation logic, I’m currently finding a match between a single excel sheet and a workbook, based on that condition I paste the matching information into the combined workbook.

Am a beginner and started Studio last week therefore apologies in advance for multiple questions, thanks! (27.5 KB)


First, you need to set Output-Datatable in ReadRange activity and BuildDataTable activity.

Next, How about to use if activity with the following condition?



Object reference error occurs when you are passing null value to the activity

Try to debug and check

Hope this will help you


Hi, thanks for the tip! Works like a charm now.
However now when I run the process - the matching values don’t get assigned at all accordingly into the combinedstats file, any clue why this is happening?

My new process; (27.8 KB)

Hi thanks for the advice, successfully debugged; Think I was missing the new datatable values when I created the activity.
Currently, my process works fine, but I don’t see my end result being transferred into the combined excel file despite assigning… not sure whats missing now (27.8 KB)


Can yo try to turn off the following AddHeader of ReadRange activity?


Sorry for the delayed response, works great now thank you so much!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.