Close workbook activity

hi close workbook activity - i am wanted to close excel workbook (fullpath saved in variable) after save excel as activity. I added close workbook, and value as variable of file pullpath… but its giving me error as cannot convert string.Please help how to close excel workbook file

Hi @r0818

can you share an screenshot of your workflow?

Regards!

@r0818

You used the Excel Application Scope right and given the full path of the workbook

Now in Properties you have a Output-> Workbook->Create a variable there

Inside the Excel Application Scope place the Close workbook activity and in Properties → Target->workbook here you need to pass that variable you created in Application scope

Hope this may help you

Thanks,
Srini


Hi @r0818

You don’t need to use the close workbook activity, Use Excel File will close the workbook once the operations has been completed

Regards

@r0818

You are mixing up the modern activity and the classic activity
Actually the modern activity has the capability to close once it is out from UseExcel File activity

Thanks,
Srini

no its not closing, so thats why mail attachment was not being sent , giving me error as could not send as file being used in another process

@r0818

Check in Use Excel File properties whether you enable the Keep Excel file Open ? If that remove the click

Thanks,
Srini

no I don’t

Are you using 2 Use excel File activities?

@r0818

In the invoke vba are you oepning any other excel and are you closing it if so?

Alternately you need not do save separately if you are usingn save changes check box

Also as mentioned by othwrs you dont need a close

Can you try adding a little delay before email and check may be before closing the next activity is invoked

Alternately you can use a kill process after excel activity and then use send email

Cheers

yes, actually three, one for reading configfile and creating dt to pass variable at the beginning and at the end , dt to csv and using excel file for formatting csv and then saving as .xlsx…then want to close , again another use excel file to send mail attaching report of .xlsx

Make sure to have all the Use Excel File inside and Excel process scope activity, you can use the Save changes property instead the activity

image

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