File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
opening excel from java
Joined: May 04, 2005
May 04, 2005 09:53:00
can be opened by command like
open -a 'Microsoft Excel'
However when using the same from
Runtime.getRuntime().exec("open -a 'Microsoft Excel'");
This fails. Any ideas?
Author and ninkuma
Joined: Jan 10, 2002
May 04, 2005 13:47:00
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:
Runtime.getRuntime().exec("open -a '/Applications/Microsoft Excel'");
not sure if that's the issue or not, but it's the first thing I'd give a try.
Asking smart questions
Books by Bear
Joined: Jan 19, 2001
May 04, 2005 16:39:00
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:
subject: opening excel from java
How to implement TREND()
Reading files have .xls extension
need to create excel and need Save As dialog boxes.
Rename Excel File using Java
Basic authentication & showing EXCEL
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015