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)
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)