Vincenzo Giuliano wrote:
Andreas Schlüns wrote:
Vincenzo Giuliano wrote:
Vincenzo Giuliano wrote:
Hi ALL,
my name is Vincenzo. I have a problem.
I try to load excel file (.xls) via java code:
PropertyValue[] props = new PropertyValue[2];
props[0] = new PropertyValue();
props[0].Name = "FilterName";
props[0].Value = "MS Excel 97";
props[1] = new PropertyValue();
props[1].Name = "Hidden";
props[1].Value = new Boolean(false);
XComponent comp=
xcl.loadComponentFromURL("path_file_.xls","_default",FrameSearchFlag.ALL,props);
But the XComponent interface is null.
So I retry with this code:
XComponent comp=
xcl.loadComponentFromURL("path_file_.xls","_default",FrameSearchFlag.ALL,*new
PropertyValue[0]*);
The file is loaded in Writer/Web.
Someone can tell me the why?
Because it's may be an HTML file in real (with wrong extension) ?
Thank you ALL.
In <OO.o
Path>/share/registry/modules/org/openoffice/TypeDetection/Filter/fcfg_calc_filters.xcu
the "MS Excel 97" Filter exists.
Moreover, if i try to start the file with double click, Calc load the
file in tranquil way.
If you make a double click (I guess you make it inside your windows
explorer ... right ?) it calls not soffice.exe ... it calls scalc.exe.
And this special binary calls "soffice.exe -calc <url>" internaly.
So you preselect the calc application.
And then your file inst loaded as "MS Excel 97" inside calc.
It's opened then as "calc_HTML_WebQuery" instead.
Pleas make sure that your file is a real xls file.
The file is a real xls file.
it would helps if you can send the document (if it's not secret) as bug
doc with an appropriate issue.
Juergen
Regards
Andreas
PS: You can try the following ... which is a "workaround" only :
PropertyValue[] props = new PropertyValue[3];
props[0] = new PropertyValue();
props[0].Name = "FilterName";
props[0].Value = "MS Excel 97";
props[1] = new PropertyValue();
props[1].Name = "Hidden";
props[1].Value = new Boolean(false);
props[2] = new PropertyValue();
props[2].Name = "DocumentService";
props[2].Value = "com.sun.star.sheet.SpreadsheetDocument";
XComponent comp=
xcl.loadComponentFromURL("path_file_.xls","_default",0,props);
The problem is still unsolved unfortunately.
Thank you Andreas.
Regards, Vincenzo.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]