lrbehmer
13 years agoContributor
Runtime Error opening Excel Spreadsheet
When I run this code, I get intermittent runtime errors:
var Excel ;
Excel = Sys.OleObject("Excel.Application") ;
Excel.Workbooks.Open("F:/my_spreadsheet.xlsx").Worksheets("Even Table").Activate ;
I am guessing that it's because the Excel executable hasn't finished loading into memory yet.
How can I wait for that? I've tried playing with sys.waitprocess, but I'm not getting anywhere.
var Excel ;
Excel = Sys.OleObject("Excel.Application") ;
Excel.Workbooks.Open("F:/my_spreadsheet.xlsx").Worksheets("Even Table").Activate ;
I am guessing that it's because the Excel executable hasn't finished loading into memory yet.
How can I wait for that? I've tried playing with sys.waitprocess, but I'm not getting anywhere.