This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

opening excel from java

 
amit vijayant
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On Mac excel can be opened by command like
open -a 'Microsoft Excel'
However when using the same from java:
Runtime.getRuntime().exec("open -a 'Microsoft Excel'");
This fails. Any ideas?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've never actually tried running any OS command like this (on OS X or any other system), but you might try specifying the full path to the application as in:



not sure if that's the issue or not, but it's the first thing I'd give a try.
 
Pauline McNamara
Sheriff
Posts: 4012
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could it be that you don't need the single quotes around the application name? From the command line you wouldn't have them.

Welcome to Javaranch Amit!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic