Excel Documents

Hi,

I am wondering if it is possible to close and open documents (such as Excel spreadsheets) directly from Igor Pro. Since it is possible to load data from Excel spreadsheets into waves using XLLoadwave, it would be convenient to be able to call that document from Igor as well.

Thanks.
The only thing that Igor can do with Excel files is load the data in them into waves.
ExecuteScriptText might be what you're looking for. From the help file:

The ExecuteScriptText operation passes your text to Apple's scripting subsystem for compilation and execution or to the Windows command line.


If you are working in windows, something as simple as:

ExcecuteScriptText "excel.exe"

will open excel in the foreground. Search for "command line" in the excel help system for details on starting excel from the command line. Also look up ExecuteScriptText in the Igor help docs for more information.

At the brief quote above states, ExcecuteScriptText also works with Apple Scripts.
For more information about ExecuteScriptText, execute these commands on Igor's command line:

DisplayHelpTopic "ActiveX Automation" // for Windows
DisplayHelpTopic "Igor Command Line" // for Windows
DisplayHelpTopic "Apple Events" // for Macintosh
DisplayHelpTopic "AppleScript" // for Macintosh

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
Thank you. I currently have half of what I want to do complete using the code below.
    Path = ParseFilePath(5, Path, "\\", 0, 0)
    ExecuteScriptText "\"" + "Excel.exe" + "\" " + "\"" + Path + "\""


I am still looking for a way for Igor to recognize what programs/files are open in the taskbar, as well as a way to close an Excel file.
To close a file that is open in Excel you will need to use Windows Scripting. For an example that can serve as a starting point, choose File->Example Experiments->Programming->CallMicrosoftWord.

You can use the same technique to make Excel open the file.