I am attempting to create a script in which an excel file is downloaded/opened via the browser. The script completes that part easily, however I then need to grab values from the excel file and this is where I am having a problem. I have tried every variant of CreateObject and GetObject I could think of and have run out of ideas on what I am doing wrong.
Code as of now:
Set objExcel = getObject("", "Excel.Application") Set objExcelwb = objExcel.ActiveWorkbook Set objExcelsh = objExcelwb.ActiveSheet intexcel = objExcel.Cells( 2, 8 ).Value
I have tried objExcelwb and objExcelsh at different points in time on the .Cells call.
I get one of a few errors depending on what I have tried. Either:
on the "getobject" line - ActiveX cannot create the object
on the "set objExcelsh" line - Object Required
on the "intexcel =" line - General Runtime Error //or// Object Required
I do have a 5 second wait before the GetObject call to make sure the excel file is fully open before hand.
Also, the "intexcel" line is part of a Sub that is at the top of the script. GetObject is called in main and the Sub is called after that.
Thanks for your time.