hello:
when I got the OpenOffice SDK from the master openoffice Page and Used
it,however the program was wrong !Oh,MyGold!I don't kown how to deal with it
!so,can you help me!
program:
using unoidl.com.sun.star.lang;
using unoidl.com.sun.star.beans;
using unoidl.com.sun.star.uno;
using unoidl.com.sun.star.frame;
using unoidl.com.sun.star.table;
using unoidl.com.sun.star.sheet;
using unoidl.com.sun.star.container;
XComponentContext xContext = uno.util.Bootstrap.bootstrap();
XMultiServiceFactory xFactory =
(XMultiServiceFactory)xContext.getServiceManager();
XComponentLoader xLoader =
(XComponentLoader)xFactory.createInstance("com.sun.star.frame.Desktop");
// PropertyValue[] myArgs = new PropertyValue[1];
// myArgs[0] = new PropertyValue();
// myArgs[0].Name = "Hidden";
XComponent xComponent =
xLoader.loadComponentFromURL(file:///C:/test.ods, "_blank", 0,new
PropertyValue[1]);
XSpreadsheetDocument xSheetDocument =
(XSpreadsheetDocument)xComponent;
XSpreadsheets xSheets = xSheetDocument.getSheets();
XIndexAccess xAccess = (XIndexAccess)xSheets;
XSpreadsheet xSheet = (XSpreadsheet)xAccess.getByIndex(0).Value;
error:
the red line is error :Return argument has an invalid type
Thank you very much!
___________________________________________________________
好玩贺卡等你发,邮箱贺卡全新上线!
http://card.mail.cn.yahoo.com/