views:

12

answers:

1

I've got a script that pulls information from an Excel(Mac Excel'04) spreadsheet, and processes it through a local database. My problem(which is temporary, pending a dedicated scripting machine w/ Excel '08) is when I need to work on another spreadsheet in Excel. I want to ensure that the AppleScript continues reading data from the correct spreadsheet.

Is there a way to pass reference to the specific Excel file in AppleScript, as opposed to just telling the Application in general? Or possibly just referencing the spreadsheet without having to have it open ... ?

A: 

Hi,

If I understand correctly, you wish to launch a script that works on a given workbook while you work on another.

the following construct should do the trick:

tell application "Microsoft Excel"
    set WB_Name to name of workbook 1

    tell workbook WB_Name
        -- Do your stuff
    end tell
end tell

Unfortunately, you cannot work on "closed" documents...

HTH

Michel Lemieux