When I tried that solution and run it, it works okay, but when I make it from scratch, using the same step-by-step activities used in the solution file, I got this error “Assign: Object reference not set to an instance of an object” and I could not figure out why cause I literally just follow every single activity there.
And yes, I have added the Sheets and workbook variables.
You got this error because the expression you used in right hand side of assign activity gives Null value. Can you please run the process in Debug mode and check values are coming properly or not.
The main reason for that error is the object is having null value that’s why
Check whether workbook variable is within scope
For that go to variable panel and for the variable you have obtained from excel application scope check with the scope column and keep to the last value that is whole sequence itself
Then this error won’t come
Or
May be i will try to reframe it with steps and hope would meet your requirements
Which doesn’t have any assign activity and uses minimal activities to achieve this
Use a excel application scope and pass the file path as input
And get the output from the excel application scope activity itself as a variable named out_workbook
Inside that excel application scope use a FOR EACH activity where mention the input as Out_workbook.GetSheets and change the type argument as string in for each activity
Inside the loop use a write line activity like this
Item.ToString
This will print the sheetname in output panel one by one
Or to be very simple we can use GET WORKBOOK SHEETS activity