0

I have alias msexcel (w32-browser "C:/program files/microsoft office/office12/excel.exe") and this means I can do msexcel from eshell and an asynchronous MS Excel will begin to run.

I am looking for ways to do msexcel "C:\\documents\ and\ settings\\me\my\ documents\\book.xlsx".

alias msexcel (w32-browser (format "C:/program files/microsoft office/office12/excel.exe /r %s" $1)) returns the error message (void-variable $1).

How do I send Excel a file name through this eshell alias?

1

I have been trying out things since posting the question. I came up with what works for me. eshell alias felt too complicated. Perhaps even this is too complicated.

(if (eq system-type 'windows-nt)
  (defun eshell/w32-launch (&rest args)
    (w32-browser (if (eq nil args)
                     "."
                     (car args)))))
0

I'd recommend instead of a an alias to open Excel with a specific file, an alias to open a file with whatever application it is associated with:

alias o w32-shell-execute open $1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.