Excel App Scope: Object reference not set to an instance of an object

I keep getting Excel Application Scope: Object reference not set to an instance of an object.

also at this point, I have also checked every single variable/argument and even added the full path to the excel app scope but to no avail, I can’t seem to identify the root problem of the bug… None of the activities within are blank and the variables are within their appropriate scopes. Any advice as to where I should focus on finding the problem?

The top left shows the input arguments from the main XAML which is working fine (ignore daysinmonth it doesn’t affect the excel app scope) which tells me that the arguments are working alright.

Here are the properties for the excel app scope

Can’t share any files as it is from the customer.

Hi @lmoham

Check with the path that you re provided with excel application scope.

Whether you re able to access from here!

Regards

yep the path is working so not sure where this problem is coming from

I commented all the activities within the excel application scope and replaced the path with a dummy file, it appears that the excel application scope will keep giving an error of Object ref not set without ever trying to open the excel file. Any idea what I could do to get it to at least open the excel file?

Not sure why this problem is even occuring with the Create if not exists box checked :confused:

Look at the activity at daysinmonth. See there is message “cannot evaluate daysinmonth” at current context. Look the variable scopes also.

Please pay the daysinmonth no mind, I commented it out and the same problem happens.

Just check have you applied data variable in output or input in read range properties.

I commented out all the activities within the excel app scope so is this problem still supposed to occur? I believe it should just open/create if not exists and end the process immediately…

The flow will process as below.

Excel scope - attach excel file
Assign values.
Read range - make variable varData
Write range - make variable varData 2
Input has to be vardata

You can’t access UiPath activities through excel.

Pls check this format and let me know it doesn’t work.

Hi @lmoham !
Indeed it’s strange.
Open your task manager and close al Excel applications if it’s still open.
Did you copy/paste by yourself the path, or did you use the icon ?
image
Would you mind trying by clicking the icon and double clicking on the file so we are sure that there is no issue with the path.

Otherwise, let’s try something else: use read range from system options:
image: does it make any difference ?

You should focus on using Debug mode only in Daily Commit Loop file so we understand what’s going on

I think you have mentioned all the activities in excel scope. Assigning values won’t run the bot as long as you don’t connect them with activities which will run.

As per your given screen shot of excel scope I feel you have assigned values and they won’t perform when you will run the bot.

Could you pls write your workflow so that we can guide you the correct way to do. Thanks.

Main.zip (132.8 KB)
Main.xaml is working as expected, just dailycommitloop acting out…

I tried both copying the path from file explorer and using the icon.

I doubt swapping to workbook would make any difference as all the activities are copied directly from a successful C# project, I’m just converting it all to vba due to language issues.

Just put read cell or range below write cell in “condition”

cos every excel file first it will read then will write.