Import DIF file to Excel

Hello,

New to apple scripting need help. Need to import a DIF into excel and found a script I believe is close however have not been able to make work in my solution. Tried automater but seems to only work with other formats not DIF

this example was posted on a site using a .MKV FILE I believe it is close to what I need

if name of (info for movieFile) ends with “.mkv” then
tell application “iFlicks”
import movieFile as QuickTime movie without gui
end tell
end tell

Mine that doesn’t work…

tell application “Excel”
import {POSIX file “/Users/Gemini_Extract/GeminiTransfer”}
end tell

Thanks for direction.

Model: Powerbook Core Duo
AppleScript: 2.3.8
Browser: Firefox 18.0
Operating System: Mac OS X (10.6)

Very much so (he said dryly).
Start here. Lots of basic stuff there.

This, and what follows, suggests to me that you have not heard of AppleScript dictionaries. Have you?
AppleScript is a peculiar language. It is not a single body of terms & syntax, beyond some very basic things. To get things done it has to talk to applications - if they will listen. Their ‘ears’ are in their dictionary: each scriptable application has its own set of AppleScript nouns & verbs.

You apparently assumed import to be an AppleScript command. It is not. It is a term which is defined in iFlicks’ AppleScript dictionary, with specific syntax. Excel has no import command.

To read an application’s dictionary: select Window > Library in AppleScript Editor, or type cmd-option-L.
If app is not in that list you can add it by using the + button at the top.

Anyway, Googling “DIF Excel” suggests that Excel can read DIF files on its own.

Edit:

I just realised Excel itself may have mislead you. There’s a command “Import text file”, somewhere in the “Data” menu (not sure about English wording, running Dutch version of Excel 2004).
Don’t expect menu commands to be replicated in AppleScript…