Applescript to open Windows file

I'me using Parallels to run Windows XP on my MAC. Is it possible to "tell" a Windows application (specifically Excel 2010 as opposed to Excel 2007 which I also have) to open a particular file, or alternatively to "tell" Finder to open my file using Excel 2010?

but I was hoping that AppleScript could run Excel via Finder
Assuming you mean the Mac version of Excel - that's trivial
I know I can do the following but it opens the file in Numbers
That's because Numbers is the default application for .xls documents. You can change the default application, or you can tell the (Mac) app to open the file:
tell application "Microsoft Excel"
  open file "path:to:your.xls"
end tell
NIn other words - tell the application directly, and don't rely on the Finder. Note that the above is the normal syntax... it might not work with Excel's AppleScript 'implementation', in which case you can still fall back to the Finder:
tell application "Finder"
  open "path:to:your.xls" using application "Microsoft Excel"
end tell
Note that the above all assumes that you're using the Mac version of Excel (not trying to script the Windows version running inside Parallels) and that the Mac can see the .xls file (i.e. it's not buried within the Windows container/disk image - if it is you'll need to move the file to somewhere the Mac can see it before you can open it in a Mac app).

Similar Messages

  • When I open a file in Photoshop CS4, how can I resize My Open Window File?it is stuck on full screen

    When I Open a File in Photoshop CS4, How can I Resize My Open Window File? It is stuck on Full Screen?

    Which operating system are you using?
    On a windows os, usually one can just double click on the title bar in the open dialog.

  • Applescript to open multiple files

    I have worked up 2 applescripts
    1. to open a set of files
    2. to position the individual windows ( finder and application)
    The first script does not open all the 4 files at one proces, it should.
    In applescript the first run, opens 2 or 3 of the 4, a second Run will open the remaining, or a 3rd run may be required, to get all 4 files open
    Same with the Applescript saved as an application
    Applscript as per:
    tell application "Finder"
      activate
              set PTH to POSIX path of (path to home folder) & "Documents/p1/client/P079/aaa"
      do shell script "open " & PTH
              set bounds of Finder window 1 to {273, 569, 550, 1100}
              set position of Finder window 1 to {6, 44}
    end tell
    tell application "Finder"
      activate
              set PTH to POSIX path of (path to home folder) & "Documents/p1/client/P079/folder_a/data_a.fp7"
      do shell script "open " & PTH
    end tell
    tell application "Finder"
      activate
              set PTH to POSIX path of (path to home folder) & "Documents/p1/client/P079/folder_b/data_b.fp7"
      do shell script "open " & PTH
    end tell
    tell application "Finder"
      activate
              set PTH to POSIX path of (path to home folder) & "Documents/p1/Office/cs_time/Time_v4/a_user_time.fp7"
      do shell script "open " & PTH
    end tell

    Spoke too soon, its still irregular.
    still requires repeating the Applescript Run to open all 4 ( 1 folder 3 files)
    Something weird with the files. I created a new generic folder and subfolders and files named as below, and this runs fine, all 4 every time. But the real project files, 3 out of four first on first run, and the 4th on the second run.
    I makes a difference too, wrt to the order; changing the folder to the last execution only opens 2 targets on the first run, then the 3rd in the second run, the 4th on the 3rd run... and other variations. Feels like some sort of reset or flush to something is required.
    I tried targetting a different file(s) and same mixed results
    It is not a typo in the paths, subsequent runs open the files
    this with test files/folders as define works every time
    set basePath to POSIX path of (path to home folder) & "Documents/p1/"
    set officePath to basePath & "_CS_Office/cs_time/Time_v4/a_user_time.fp7"
    set clientPath to basePath & "FileMaker/_activeProjects/Client/P079/"
    set DR1 to "aaa"
    set FA to "folder_a/data_a.fp7"
    set FB to "folder_b/data_b.fp7"
    do shell script "open " & clientPath & DR1
    tell application "Finder"
              set bounds of Finder window 1 to {273, 569, 550, 1100}
              set position of Finder window 1 to {6, 44}
    end tell
    do shell script "open " & clientPath & FA
    do shell script "open " & clientPath & FB
    do shell script "open " & officePath

  • Applescript to open a file in mplayer

    Hello,
    I've been trying to write an applescript that simply opens a file and the passes the path of that file to mplayer with "do shell script." I can figure out how to make it work by using a select file dialog, but I can't seem to make it work as an application that can actually be used to open files.
    The general idea here is that I want to use a terminal program as my default app to open files in Finder. Other suggestions on methods to do this are welcome, too.
    I'm aware of the GUI Mplayer OS X, but I'd prefer not to use it.
    Thanks in advance!

    gh02t wrote:
    I want to be able to double click it in Finder and have it open in mplayer.
    still don't understand why you need apple script at all for this but it's your call.
    I figured that writing an applescript to act as a handler that passed a file from finder to the command line would be the best approach.
    that can of course work. let's say you've passed this_file to the script as input.
    are you looking for something like this:
    set fpath to POSIX path of this_file
    do shell script "mplayer "&fpath
    sorry, don't know the syntax to invoke mplayer from command line but I assumed it would be "mplayer path/to/file"

  • Applescript to open various files and add info from filename to the file

    Hi guys,
    first time using this forum...
    and first time trying to do a script for apple...
    I figured out how to do simple things... like open files and stuff to text files...  but don't know where to begin:
    I have a directory datalogs...
    within the directory i have multiple text files that have the following format:
    dataXXYYY_Waf2_7_19_11.csv
    dataXXYYY_Waf3_7_19_13.csv
    dataXXYYY_Waf25_7_19_16.csv
    typically 25 files, but sometimes less
    I would like to be able to take each file within the datalogs folder ...
    Scan the file name and look for the number afer Waf
    The number can be anywhere from (single digit) 1 to 25
    I would like to take that value after Waf  and then append a line in the txt file
    the line I would have to add will be 5 rows down and it shoulld say:
    wafer,1 
    the 1 above is the value that was in the file name....
    i.e.
    for the file
    dataXXYYY_Waf25_7_19_16.csv
    before append the file contains random data ... i.e.
    dummyline1
    dummyline2
    dummyline3
    dummyline4
    dummyline5
    dummyline6
    Then after the script...
    the file will be saved with same name:
    dataXXYYY_Waf25_7_19_16.csv
    and the data should look like:
    dummyline1
    dummyline2
    dummyline3
    dummyline4
    wafer,25
    dummyline5
    dummyline6
    any help will be appreciated
    -thanks

    Copy your source folder - named 'datalogs' to your home directory and run this script by copying into a new AppleScript Editor document and pressing Run. 
    I think I've followed your specification, and there will be other ways to do this, but ask if you have questions.  (I have put comments in the code which should explain some of it!)
    There is no error checking, but I have made copies of the original files in the source directory.  (You can comment out the line "duplicate theFile" by prefixing with "--" when you are sure it's working.
    As always, ensure your data is backed-up before proceeding.
    --starts here
    --sets path to datalogs folder
    set theDirectory to (path to home folder as text) & "datalogs"
    set fileNames to {}
    tell application "Finder"
      --gets all the files in the source directory
              set fileList to files of folder theDirectory
      --iterates through the files
              repeat with theFile in fileList
      --makes a duplicate
      duplicate theFile
      --puts the fileName and fileLocation into records in a list of lists
                        set end of fileNames to {fileName:name of theFile, fileLoc:theFile as alias}
              end repeat
      --iterates thru the files
              repeat with theFile in fileNames
      --gets offset of the string "Waf"
                        set WafOffset to offset of "Waf" in (fileName of theFile)
      --trims the name so that it now starts with the character after "Waf"
                        set fileName to text (WafOffset + 3) thru end of fileName of theFile
      --gets offset of the next underscore
                        set UScoreOffset to offset of "_" in fileName
      --stores the desired number by trimming off the end of the file name
                        set fileNumber to text 1 thru (UScoreOffset - 1) of fileName
      --sets up the text to insert by prefixing with "Wafer," and suffixing with return
                        set insertText to "Wafer," & fileNumber & character id 10
      --opens the file with write permission
                        set FileRef to open for access (fileLoc of theFile) with write permission
      --initialise container
                        set fileContents to ""
      --puts first five lines into container
                        repeat 5 times
                                  set fileContents to fileContents & (read FileRef until character id 10)
                        end repeat
      --adds the new text to the container
                        set fileContents to fileContents & insertText
      --adds the rest of the file to the container
                        set fileContents to fileContents & (read FileRef)
      --effectively empties the file
      set eof FileRef to 0
      --writes contents of the container to the file
      write fileContents to FileRef
      --closes the file
      close access FileRef
              end repeat
    end tell
    --ends here

  • CS4 apps are VERY slow to open Windows file browser with File Open or File Save As commands

    We are running CS4 on Windows 7 with all available updates installed.   Photoshop and the other CS4 applications are VERY slow to open a Windows file browsing window to select files when File Open or File Save As menu options are run -- it can take as long as a minute or two for the window to open.  Once the window opens and a file is selected, then opening or saving the file is very quick.  The location of the default directory, whether it is on a local drive or a network drive, makes no difference.  Any suggestions as to what the problem might be?

    Raphman02
    The link that I posted earlier is off.  Read this one
    http://support.microsoft.com/kb/2501584.  I discovered in my network that the MS Office File Validation Patch made excel crawl when opening over the network though nothing else changed. At the time I was opening Excel on Office 2003.
    You can manually turn this off by editing the registry and tunring it off.  Going forward I skipped the patch to keep my sanity.  Not sure if this is the same as your issue, but the support article will go into detail how to either have Fix it
    clear the issue or change the proper registry keys.
    Hope this helps

  • Opening Windows files

    I'm wishing to open a .exe file. Do I need to install a complete Windows OS and Parallels, or can I use something in Crossover?
    http://www.codeweavers.com/products/cxmac/
    I'm asking because I don't know which application on Crossover will open the .exe file.

    *"Do I need to install a complete Windows OS and Parallels, or can I use something in Crossover?"*
    You can do either of those things to open an .exe file. Whether CrossoverMac will open it, you'd have to confirm that with Codeweavers support.

  • Open Windows File Explorer in Separate Window from App

    Want to open My Computer at a particular folder location.
    Should simply open separately for the user to browse files.
    How to do this?
    Thanks.
    Solved!
    Go to Solution.

    “A child of five could understand this. Send someone to fetch a child of five.”
    ― Groucho Marx

  • Flip4mac(to open Windows media files) version 2.4.4.2 won't work with OS X Yosemite?

    Flip4Mac(version 2.4.4.2) won't work to open Windows files on OS X Safari. Do I need to pay for an upgrade?

    Upgrade to newer version which is comparable with Yosemite.

  • Developers I need an applescript that opens documents in excel from a specified folder and saves them as .xlsx from their current .xlsb

    mule13470 
    Apr 3, 2014 11:12 AM 
    I tried simply renaming them however it just corrupts the files when I do it like that so I need the applescript to open the files in excel and the save them as .xlsx to test I only need it one folder but if it works I'd like to be able to do it for all documents with .xlsb extentions that are in a huge folder with subfolders that contain a mix of .pdf, .docx, .xlsx and .xlsb. Please Help.
    Applescript Editor, Mac OS X (10.6.8) 
    I have this question too (0) 
    Reply
    Categories: Using OS X MavericksTags: mac, help, finder, excel, applescript_editor
    Level 1 (0 points)
    mule13470
    Re: I need an applescript that opens documents in excel from a specified folder and saves them as .xlsx from their current .xlsbApr 3, 2014 11:19 AM (in response to mule13470) 
    In that huge folder I only need the .xlsb files opened and saved to .xlsx not the others, in case that wasn't clear above.

    In that huge folder I only need the .xlsb files opened and saved to .xlsx not the others, in case that wasn't clear above.

  • I need an applescript that opens documents in excel from a specified folder and saves them as .xlsx from their current .xlsb

    I tried simply renaming them however it just corrupts the files when I do it like that so I need the applescript to open the files in excel and the save them as .xlsx to test I only need it one folder but if it works I'd like to be able to do it for all documents with .xlsb extentions that are in a huge folder with subfolders that contain a mix of .pdf, .docx, .xlsx and .xlsb. Please Help.

    In that huge folder I only need the .xlsb files opened and saved to .xlsx not the others, in case that wasn't clear above.

  • Unable to open Office files on SharePoint 2010 sites on Windows Server 2008 R2

    Setup: Windows SharePoint Server 2010 sp1 on Windows Server 2008 R2 (hosted on VMWare VSphere ESXi 5.1)
    Secured using Domain SSL from GlobalSign.
    Client OS: Windows 7 Professional 32bit & Windows XP SP3 32 bit
    Browsers: IE10, IE9,IE8
    Office: Office 2010, Office 2010 sp2 (both 32bit), Office 2007
    Problem Description: Only recently, users started having issues with opening Office files (Word, Excel) on SharePoint sites. When you click on an Office file e.g. Word Document, it comes up with the option to select "Ready only" or "Edit"
    and choosing either options and re-entering the login credentials results in the
    application hanging. If you leave it for a while (about 5 minutes) sometimes the file opens and other times it gives the error "Could not open https://portal.com/XXX/XXX/Document.docx". Even when it opens, it's extremely
    sluggish and can't do anything other than end it via Task Manager. Same with excel files. 
    This happens to all the users all different OS and browsers.
    On XP Pro SP3 w/ IE8, when you click on the file, the login prompt keeps popping back up repeatedly and if you click cancel, the file loads up anyway but no way of saving back onto the SharePoint site.
    IMPORTANT: One exception is when logged in as a Site Collection Administrator, it
    works like a dream bizarrely!!!! Opens, Edits and saves back fine on the SharePoint site.
    Have tried following:
    1. Repaired Office 2010 Pro; Uninstalled/Re-installed Office 2010 Pro
    2. Reset Browser, unticked automatically detect proxy settings.
    3. Emptied OfficeOfflineCache on Client
    4. Removed WebDAV from the SharePoint server
    5. Added Antivirus folder exclusion (We use SEP 11) on the SharePoint Server
    Note: PDF files opens fine for all users.
    I would immensely appreciate if anybody has got any advice/pointers/suggestions. Desperately out of ideas at the moment.
    regards,
    Compter Sez No!

    Hi,
    According to your description, When you try to open a Microsoft Office document from a SharePoint 2010 site in a client application, the document opens slowly and you are prompted to enter your credentials multiple times.
    This issue may be because of SharePoint Web Front End (WFE) server(s) has Antivirus software installed and the exceptions are not set correctly.
    I recommend to remove the antivirus software or set the correct permissions for the antivirus software to resolve the issue.
    To configure the antivirus exceptions, please follow the guidelines in the below articles:
    KB943620:
    Folders to exclude when you perform a file-level antivirus scan on a server operating system.
    KB952167:
    Certain folders may have to be excluded from antivirus scanning when you use a file-level antivirus program in SharePoint.
    KB943556:
    Recommended file and folder exclusions for Microsoft Forefront Client Security or Forefront Endpoint Protection 2010.
    Best regards.
    Thanks

  • I cannot open a pdf file with aole-mail. I can open pdf files from windows explorer. I have associated pdf with adobe reader. My operating system is window

    I cannot open a pdf file with aol e-mail. I went to preferences in Adobe Reader but did not know what to enter for Incoming IMAP and outgoing SMTP. I can open pdf files from windows explorer as  I have associated .pdf files with adobe reader. My operating system is windows 7.
    When I try to open the pdf file within aol e-mail I get a message: 'Your security settings do not allow this file to be downloaded'.  I have not changed my security settings (Tools, Internet Options, security).

    Or http://helpx.adobe.com/acrobat/kb/pdf-browser-plugin-configuration.html

  • Hi.  I have a Dell PC running Windows 7 64 bit.  I have the latest version of Adobe Reader,  It worked yesterday.  Today I have job training to do that is due tomorrow morning and I can't open PDF files.  I have to open a guide and read it and take a test

    Hi.  I have a Dell PC running Windows 7 64 bit.  I have the latest version of Adobe Reader,  It worked yesterday.  Today I have job training to do that is due tomorrow morning and I can't open PDF files.  I have to open a guide and read it and take a test tomorrow.  I have deleted and reinstalled the application.  I have rebooted.  I have made sure my PDF's are associated with the program.  Every PDF on my computer won't open and I get the same error message.  It simply says Attempt to access invalid address.  How can I fix this?  Thanks.

    Hi Don,
    I have seen this issue fixed for some users by modifying the following registry key:
    The key is "HKLM\System\CurrentControlSet\Control\Session Manager\Memory Management" MoveImages
    Set the key to 1 instead of 0 then reboot the machine.
    In case you still face the issue try the following registry key change:
    The only thing you have to do is rename the following key at the REGEDIT, and everything will be fine !!
    BEFORE:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\iexplore.exe
    AFTER:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\iexplore.old
    Note: Please take a backup of the registry before attempting this change.
    Regards,
    Rave

  • How can I access files from a flash drive that were previously saved using a Windows computer? When I attempt to open the file on MacBook Pro, it is asking to "convert file to"; I also have Microsoft Word installed on the Mac as well.

    How can I access files from a flash drive that were previously saved using a Windows computer? When I attempt to open the file on MacBook Pro, it is asking to "convert file to"; none of the options I choose work. I also have Microsoft Office (with Word) installed on the Mac as well.

    Format the external drive as FAT32 or ExFAT. Both computers will then be able to read and write to it.

Maybe you are looking for

  • I facetime

    yep, i know that not big trouble for you guy but not my family or wife. Since my wife update my mac in to YOSEMETE 10.10 that's have been bring so many troubles. the most important is iface time, i am working far away from her then the only thing kee

  • Cwgraph3d variants in labview?

    Hi there, first time poster - though I've been reading these forums for a long time.  They're quite helpful.  Anyways, on to my problem... I'm using a 3d graph (cwgraph3d) in a simple labview vi and am trying to extract mouse position coordinates.  

  • Passing data parameter between SWF files

    Hello Xcelsius Gurus, Is it possible to pass data parameter between SWF files? If possible, how to achieve it? Thank you. Justine

  • How can i change favourites in finder

    i am not able to remove one video from favourite in finder

  • VF03-- Cash Discount(Header Level ) - Amount, say, 3%,   Where stores?

    Hi Experts, The VF03(Display Billing Doc)--> Cash Discount(Header Level ) - Amount, say, 3%,  In which table, it stores? Path is, VF03>Menu>GO TO>HEADER->Pricing Conditions Header>(Condition Type)SKTV> Amount, say, 3%------->Where it stores? Thanq.