Using an Excel Scope, with a filepath in a variable, when the file is in use, the ExcelWrite Range activity is automatically saving the file locally to “C:\Users\<username>\Documents”.
Or am I going crazy?
I’m wondering if this is something anyone else is noticing.
Studio and OS version used:
Excel Activity version:
Workaround:
I will probably end up using Workbook Read Range to check if file is in use before entering Excel Scope so I can throw an error as desired.
Solution?
Assuming I’m not crazy and this is indeed a problem here are my solution Ideas:
I think the Excel Write Range should either throw an error when it is in use or (preferrably) change the filename to include a number like “directory\filename (2).xlsx” or “directory\filename (3).xlsx”
tried with excel package 2.0.6526 (latest release)
if i have the same excel doc opened, the excel scope activity+write range, will write the data in it
there is no additional file created, anywhere
can you share your wf?
Yes, so I can open the excel file with multiple users or on different machines but one opens as read-only. I also verified that the Excel Scope is opening the file as read-only then writes file to local documents folder instead.
Hi @inyourgravity,
I think there might be an update to this in v2019, but until then there are few workarounds you can do.
If you use the Workbook Read Range, it will throw an error. So, one approach I have taken is to store an output filepath with an incremental number next to it. Basically, if “filename.xlsx” is in use then it changes the filename to “filename (2).xlsx”, and so on.
Here is a snippet with this approach using a Retry Scope: