Delete Range, without Excel Scope

Hello,

I have an excel file, where i should get some data from, later delete all that data.

I’m trying to find a way, without using excel scope, any ideas ?

Thank you

@ppr

Would you have any idea, on how to remove selected range from excel file, without using excel scope and delete range activity?

what is the reason / motivation for not using EAS?

Excel, keeps crashing, since the process has too many transactions and in each transaction, it has interact with it a lot.

So trying to using anything, but excel scope.

do a check if Balreva Activities will work more stable

I’m not allowed to use to use custom activities…

If we can’t use delete range, is there any other way? Like, I tried overwrite, but didn’t really work as expected…

@maroua301

I don’t know enough about your process to know what is possible. But, if you can’t do it in EAS, I’d think the next thing I’d try would be doing it all as DTs. So, I’d do something like Read Range for the excel file, any manipulations that need to be done with it (such as Filter DataTable if needed), and then write range to output it to an excel file. If its creating odd overwrite problems, you could use Delete File to delete the original, and then write a new one after.

Just a thought.

If you can explain what manipulations are happening, it may be easier to come up with a better solution though.

1 Like

Based on this comment it seems like it may have to do with your order of operations. You should not be opening/closing excel often. You should not need to interact within excel all that often. Instead you can get data from it, do the processing, then post all the post-processing outputs into excel at the end.

IF there is a business reason you need to write to the excel file often (this is extremely rare) it still shouldn’t cause excel to hang up. It is closing and opening the application which will cause problems. If you keep the excel application scope open by outputting the variable and only closing at the end of the process, it should eliminate this issue.

One other problem that is possible with writing to the excel often is if it’s on a network drive rather than local, then it will be dependent on connection speed. This can be solved by copying file locally, then overwriting to the network location at the end of the processs

1 Like

How is your loop set up? Do you have Excel Application Scope inside the loop, or is the loop inside Excel Application Scope?

Why are you using a loop? What is happening in the loop?

How did it work, and what did you expect?

Hello,

Thank you all for you responses, actually it’s what @Dave said, the issue was, since I’m using a shared drive, so it takes much more time to open and close the file, also depends on the connection speed. So what I did this morning is to do everything locally, than later make a copy of the file to put on the shared folder. This fixed all my issues regarding excel.

Cheers

2 Likes

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