The process cannot access the file because it is being used


#1

Hi All,

I am saving a file as an excel (.xls) and then after invoking a code for creating a zip file.
But i am getting an error that -
Invoke method : The process cannot access the file because it is being used by another process

Please help me . Please. Urgent one.

Thanks in advance,
Hemal


#2

Are you closing the excel before invoking the code to create a zip file.
If not, please close the excel file (because excel process will be running in the background).


#3

@KarthikByggari,

Thanks for the quick response. I am not opening any excel file but I am exporting the data from the web to text file and I am saving that file as “ABC.xls” .

Can you please tell me if tere is any need to close the excel for that ? Though I have put the kill activity with the process name as “EXCEL”. Still not working.

Thanks.


#4

It’s happened to me before where the Excel file is opened in the background. Follow this Ctrl+Alt+Delete > Task Manager> End task to Force Close any excel Applications opened.


#5

@Haich,

I have tried all the options including your’s :frowning:
Still no hope.

Thanks.


#6

I guess the Excel sheet which you are importing data into is opened in the background. That would need to be closed in order to rid of the error.


#7

Hey @Haich, @KarthikByggari,

I have killed the excel process before invoking. Now I am not getting that error but it is saving successfully with no data.
(showing 0 bytes in excel file with no data). Can you please help me on this?

Thanks in advance,
Hemal


#8

@hemal Could you show a screenshot of your workflow?


#9

Before exporting text file as excel - please save the text file and then export to excel; save the excel. At the last kill excel process.


#10

@Haich,

I verified that my excel file is being saved and then at the time of Zip, data is getting 0 bytes.

where filepath including two excel files and zippath including the folder name with extension as .zip (where we have to extract)

Thanks in advance