Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How to process MS EXCEL with a file on MAC

Discussion in 'Scripting' started by Gamars, Nov 20, 2013.

  1. Gamars

    Gamars

    Joined:
    Aug 16, 2013
    Posts:
    14
    Hi all.:D
    I am working on an Editor project for Unity3D.
    I want to process MS EXCEL with a file.
    So i use code like this:

    Code (csharp):
    1.  
    2. System.Diagnostics.Process.Start(excel_path, file_path);
    3.  
    It work fine on Windows. But it can't work on Mac.
    Any advice for me to solve it?:):):)
     
  2. rutter

    rutter

    Joined:
    Mar 21, 2012
    Posts:
    84
    If you don't have Excel installed, it's going to be pretty hard to run it. :):):)

    What are you actually trying to do? If you just want to run a spreadsheet editor, you'll need to get a copy of Office for Mac or some other program that can edit your files. If you want to edit the spreadsheet from code, you should probably find a cross-platform library suited to the task.
     
  3. Gamars

    Gamars

    Joined:
    Aug 16, 2013
    Posts:
    14
    Thanks for your reply.
    I have installed Excel on my Mac. And i want to click an custom button or a menu command in Unity Editor to open the Excel and with a spreadsheet file.
     
  4. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Sorry to chime in so late, but I just stumbled across this... and I think you can probably solve it using Application.OpenURL, if you construct a file:// URL to the Excel file.

    Another alternative would be to use the "open" console command via Process.Start, as described here.