Using an Excel Application scope through invoked workflows

Perhaps this has been asked in a previous post, could not find any though.

It happens that we’re in the need of writing/reading data to/from Excel files several times in different, connected, workflows. It seems that the workbook cannot be passed to be reused. Is this by design or how is this intendended to be used in practice?

Thanks

// André

You can use the ExistingWorkbook property of the Excel Application Scope activity to save the workbook to a variable and pass it to other workflows as an argument.
Example: WorkbookArgument.zip (11.0 KB)

3 Likes

Sorry for the late reply.

Thanks for clarifying the usage.

Although, doing a similar approach in 2018.4 yields another result it seems.

Any thoughts on performance in your experience? As compared not reusing the workbook?

Regards André

Hi,

I’m encountering myself in a similar situation. Inside an Excel Process Scope, I extracted a couple of processes into Workflows, that are being reused several times in loops and the like, for the sake of organizing code and avoiding duplicating it. Now, in those workflows I must be writing cells and the like, but of course, it complains about the Write Cell activity only being able inside the “Use Excel File” scope.

The Excel Application scope you provided in your example (UiPath.Excel.Activities.ExcelApplicationScope), apart from being of a 4 year old example, has nothing to do with the “UiPath.Excel.Activities.Business.ExcelProcessScopeX” I’m using.

By the way, again, and for the sake of God,

Is it possible for UiPath staff to avoid REPEATING THE SAME NAMES for DIFFERENT ACTIVITIES in DIFFERENT PACKAGES?

I already complained about that. It’s a nightmare to search for info about this; there’s a bunch of different Excel activities, some of them obsolete, some available to certain types of project, some for the 365 version of Office, some for the “standard” ones… OMG!! Please refer to them with different names! It takes a lot to figure out which one are the docs you’re reading referring to! Or the topic in this forum!

Anyway, my activity (or the child “Use Excel File”) doesn’t provide a way to pass its own reference to a function, or workflow or whatever you call it, so I don’t find a way that I can organize my code in Workflows for mere readability. I have to nest loops in loops because of this silly “you need to be in that scope” limitation. Do you think this is serious?

How can I overcome the situation, in case it can be done at all?