Excel "CurrentWorksheet" object returns null always

Hi, I need to use the Range method for CurrentWorkSheet object to get the NumberFormat property for a specific cell but worksheet object returns null value for some reason. Did anyone else come across this scenario?

Any help/lead is appreciated. Thanks.

PS: in the screenshot, wbJournal variable is a WorkbookApplication object obtained as output from Excel Application Scope activity.


Hi @swathykodoth

Welcome to our UiPath Forum! :slight_smile:

Please try it like this:


or simpler


The thing is, I suppose Excel Application Scope simply won’t have the CurrentWorksheet set due to the fact that you don’t specify any concrete sheet to be worked on when you invoke it.

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