VBA to Applescript - query table

E

Ernie_Beffel

Version: 2008
Operating System: Mac OS X 10.5 (Leopard)
Processor: Intel

I cannot figure out how to make Query Table work in Applescript

The VBA code (shortened to remove properties that I didn't reset) was

Range("A1").Select
With ActiveSheet.QueryTables.Add(Connection:=_
"TEXT;Level1:Level2:"_
&"filename" _
, Destination:=Range("A1"))
..TextFileParseType = x|Delimited
..TextFileConsecutiveDelimiter = True
..TextFileOtherDelimiter = "|"
end with

Now, I can get Open Text File to work like this

open text file filename fileOne origin MSWindows data type delimited other char "|" field info {{1, 3}, {2, 9}, {3, 9}, {4, 2}, {5, 9}, {6, 9}, {7, 9}, {8, 9}} with use other and consecutive delimiter

But, I'd like more control where I put the parsed file, so I want to use Query Table.

Is it something like "make new query table ..." or "set query table ..."

I've tried for several hours and searched everywhere without much reference to "query table" for Applescript.

Could one of you VBA gurus give me a code sample that uses Query Table to insert the contents of a CSV format table into cell A1 of the active table, using some of the same parameters as my Open Text File example above?

Thank you.

Ernie Beffel (e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top