I know I can tell Excel to open a file with:

open MAC\ Addresses.xlsx -a "Microsoft Excel.app/"

But I cannot figure out how to do anything with Excel from the terminal.

Where can I find a list of the commands that can be sent to Excel from the terminal?

  • did you try /Applications/Microsoft\ Excel.app/Contents/MacOS/Microsoft\ Excel --help ?
    – anki
    May 6, 2020 at 7:19
  • Had not, but when I just did it opened a blank workbook. And I got this repeating in terminal: 'Microsoft Excel[98574:4719817] Stream 0x7fcee5f60e30 is sending an event before being opened' and terminal is stuck (no prompt)
    – 111936
    May 6, 2020 at 9:04
  • There currently seem at least three questions in your post: How can I catch the output of arp -a in a form useable by Excel, how can I launch Excel from Terminal with this and how can I send commands from Terminal to Excel. So can you edit your question to focus on the main objective here?
    – nohillside
    May 6, 2020 at 11:16
  • The sending commands from the terminal would be done with osascript. Excel's applescript dictionary isn't extensive, but it works. Your command 'arp -a | > newcsv.csv' would indeed create an empty file, as your syntax is incorrect. You don't pipe into a redirection operator. And I don't think you're going to get a reasonable CSV file without some pre-processing, probably through awk or sed. May 6, 2020 at 16:34
  • Have rearranged the question to clearly identify my question. --- And i see now that i will need to take the arp output into a txt file and then replace spaces with commas before handing that off to excel. I'm a novice, obviously, and am learning as I go.
    – 111936
    May 6, 2020 at 21:29

1 Answer 1


Excel is primarily a GUI application, there isn't much more you can do from the Terminal than using open to have it opening a file.

Excel has a little AppleScript interface you can use via osascript, but it only supports a minimal set of commands.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .