aspose file tools
The moose likes Mac OS and the fly likes opening excel from java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Engineering » Mac OS
Bookmark "opening excel from java" Watch "opening excel from java" New topic
Author

opening excel from java

amit vijayant
Greenhorn

Joined: May 04, 2005
Posts: 1
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

Joined: Jan 10, 2002
Posts: 63042
    
  69

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Pauline McNamara
Sheriff

Joined: Jan 19, 2001
Posts: 4012
    
    6
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!
 
Consider Paul's rocket mass heater.
 
subject: opening excel from java
 
It's not a secret anymore!