Vincenzo Giuliano wrote:
Hi ALL,
I come to a conclusion.
This code start a .xls file (if it exists).
I accept any advice.
public class LoadExcel {
/[EMAIL PROTECTED] null if url don't exists*/
public static XModel startExcelFile(String urlExcelFile)throws
java.lang.Exception{
/**Bootstrap*/
com.sun.star.uno.XComponentContext contestoRemoto =
com.sun.star.comp.helper.Bootstrap.bootstrap();
System.out.println("Connected to a running office ...");
com.sun.star.lang.XMultiComponentFactory serviceManager =
contestoRemoto.getServiceManager();
String available = (serviceManager != null ? "available" : "not
available");
System.out.println( "remote ServiceManager is " + available );
/***/
Runtime r = Runtime.getRuntime();
Process p = r.exec("soffice -calc "+urlExcelFile);
Does this solve your problems realy ?
If it's so - please make realy sure your file is a real xls - file.
Your code isnt realy a fix ... it has some other disatvantages.
Please use the normal API of OOo - not the command line.
As Jürgen already mentione: please file an issue on OOo containing your
test document (if it's not private).
Regards
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]