Forum Discussion

lrbehmer's avatar
lrbehmer
Contributor
13 years ago

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.
  • VenkataRanga's avatar
    VenkataRanga
    Occasional Contributor
    Dear All,



    I am also facing same runtime error opening excel spreadsheet which Lance mentioned, after executing few scripts. I am using same code given above Tanya given. Is this issued fixed ? If yes, please help me how to fix it.



    Thank in advance!



    Regards,

    Venkata Ranga.