Excel Remain Open Issue

Hello @UiPath_Community

I am using Read Range and Write Cell activity to read and update data in excel. But while running my automation bot use to open excel for reading as well as for updating data. Sometime it do not close excel and due to which my automation stucks in between and fails.
What should I do so that bot can read and update excel with out opening it in background.

Thanks In advance

Hi @Vaibhav_Shukla

In the Excel process scope activity open the properties in Existing processes action option select the Force kill option in dropdown. It will close the excel automatically after the activities inside Excel Process scope activity ended. Keep Show Excel Window as False

Regards

@Vaibhav_Shukla ,

You can use Read Range - Workbook activity to red the data into DataTable and do the update in Datatable.

Once everything is ready you can use Write Range - Workbook activity to write the data back again to Excel.

Thanks,
Ashok :slight_smile:

@Vaibhav_Shukla

Use workbook activities to read the excel Instead of Excel Process scope or Excel application Scope.If you have huge data then use Excel process scope then


This will not open the excel in background it will open

Hi @Vaibhav_Shukla

Try this:


OR For safe side you can use Kill Process Activity after you complete the excel tasks with Continue On Error as True



Hope it helps you to understand :slight_smile:

Hello @Nawazish_Ahmad

If we use kill process to close excel and if again we open excel below kill process, so will it not create any error or issue while reopening ??

1 Like

@Vaibhav_Shukla No, it will not create any problem.