Monday, January 4, 2021

 

Ideas to deal with Excel Hanging

 

Problem

if you use excel scope activity, excel is supposed to close after the scope is closed. It takes a while for excel to close. In windows 10 and 0365 it takes a very long time to close. When reopening excel, excel can hang.

 

Solutions

 

Kill

Before each scope make sure to kill excel processes

Issue – the kill doesn’t always work

 

Keep scope alive

Open excel scope only once and keep the session in a shared variable throughout the bot








 

Use system file read range

Instead of using scope use the following:


 

 

Issues

1)

If the spreadsheet contains email addresses you will get invalid url issue – go into excel and remove the links

tgermazvi@herbert.com

 



2)

If there are dates, this will pick up the excel numeric date

You need to convert back to date:

DateTime conv = DateTime.FromOADate(d);

No comments:

Post a Comment