How to close open XLSX file using config.xlsx parameters

Hello, I am trying to close an open xlsx file using the parameters in a config.xlsx file.
The file location is “XLSxFileLocation” within the config.xlsx.
So when I try to close the file via the “Close Workbook” using the XLSxFileLocation parameter, I get the following error: Cannot implicity convert type string to ‘UIPath.Excel.WorkbookApplication’"

Any ideas?
Thanks in advance, Sky

1 Like

Hi
Fine

Close workbook activity usually it will take only WorkbookApplication variables are supported.
–so get the workbook variable from the excel application scope activity and pass that as input to the close workbook activity

Cheers @Skyman

Hello @Skyman

Close workbook activity only accept workbook type as a input… Means if you open an execl using excel scope then it will return an output as a workbook that you can pass inside this close workbook activity.

If you opened it normally by using some other activity then use hot keys like alt+f4 to close it.

Regards
Ajay

Thank you all for your input. For now, I’m heading in a slightly different path, and it is working.

Cheers, Sky

I am using the Kill Process activity, as all excel xlsx files must be closed for this bot. Not my choice, but the clients.