Need help with an applescript for excel. Using a mac 9.02 and office 2001. I have an excel file with only one Column called User_ID. I Need to take all the strings in that column and add them to a listbox in a Realbasic5 app (Populate a listbox). But when my Excel activates I need a file open dialog box so I can choose which Excel file I want to use at that time. myFile = Application.GetOpenFilename (“All Files, .”)
on run
tell application “Excel”
activate
open file dialog box
select
close every workbook
quit
end tell
end run
If you know the location of the excel file you wish to open, why NOT let the Finder do the work for you!
for example I have an excel file I regularly open called “Site Info”.
It is located at: file “Site Info” of folder “Paul” of folder “Courtade” of startup disk
So my script reads as follows:
tell application "Finder"
select file "Site Info" of folder "Paul" of folder "Courtade" of startup disk
open selection
end tell
I use this code to get a dialog box to come up so I can choose the file. But after I choose my excel file in the dialog box and hit the open button nothing happens. My file I Selected doesn’t open. Help
tell application “Microsoft Excel”
Activate
set File_Open to (Choose File With Prompt " “Select an Excel File.”" )
Open
end tell
Would there be a way to select a column to the EOF. Not anything like this select column (“A”).
Something more on the line as this
Start the selcetion from the 2nd row of the 1st column to the End of File of 1st column
select Range “R2C1:EOFC1”