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 Soft Skills this week in the Jobs Discussion 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: 61764
    
  67

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!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: opening excel from java