I am not seeing that the function in Excel to “Get External Data/Import Text File” under the Data menu is scriptable. Has anyone done this? I am in Office 2004.
As a second option, I can deal with opening the text file. I am finding that the command is not working correctly though. I have a date in the data so I want to open the file with all cells formatted to “Text”. No matter what I do, they all open as general and the date auto formats itself to a date format, which basiclly ruins the result.
Here is what I have. I saw on another post that “2” is the text format.
on open this_item
tell application "Microsoft Excel"
launch
open text file filename (this_item as string) origin Macintosh start row 1 data type delimited text qualifier text qualifier double quote field info {{1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2}, {6, 2}, {7, 2}} with comma
end tell
end open
Model: G5
Browser: Safari 419.3
Operating System: Mac OS X (10.4)