J
jim_in_dh
Version: 2008
Operating System: Mac OS X 10.5 (Leopard)
Processor: Intel
I am trying to create a web query in Excel 2008 with Applescript. I can make the query run manually, but whenever I run my
script, I get a message that says the object is not found (the query table). When I try to 'make' or 'select' the query table,
I get a message that says I cannot make class query table.
Here is my script
set webqueryfile to ¬
"file path name"
tell application "Microsoft Excel"
set WkBk to open workbook workbook file name ¬
"spreadsheet name"
set newSheet to make new worksheet at beginning of active workbook with properties ¬
{query type:web query, connection:webqueryfile, destination:"a1"}
activate newSheet
set qt to make new query table of active workbook -- AT THIS POINT THE CANNOT MAKE CLASS QUERY TABLE ERROR occurs
-- set fill adjacent formulas of query table 1 ¬ -- this line is from the MS developers site. If I comment out the above line,
-- of sheet newSheet to true -- and uncomment these lines, I get the message OBJECT DOES NOT EXIST.
end tell
Thanks for any suggestions.
Operating System: Mac OS X 10.5 (Leopard)
Processor: Intel
I am trying to create a web query in Excel 2008 with Applescript. I can make the query run manually, but whenever I run my
script, I get a message that says the object is not found (the query table). When I try to 'make' or 'select' the query table,
I get a message that says I cannot make class query table.
Here is my script
set webqueryfile to ¬
"file path name"
tell application "Microsoft Excel"
set WkBk to open workbook workbook file name ¬
"spreadsheet name"
set newSheet to make new worksheet at beginning of active workbook with properties ¬
{query type:web query, connection:webqueryfile, destination:"a1"}
activate newSheet
set qt to make new query table of active workbook -- AT THIS POINT THE CANNOT MAKE CLASS QUERY TABLE ERROR occurs
-- set fill adjacent formulas of query table 1 ¬ -- this line is from the MS developers site. If I comment out the above line,
-- of sheet newSheet to true -- and uncomment these lines, I get the message OBJECT DOES NOT EXIST.
end tell
Thanks for any suggestions.