*/
public void checkPreviewHeaderCells() {
XInterface oObj = null;
SOfficeFactory SOF = SOfficeFactory.getFactory( mXMSF);
XSpreadsheetDocument xSpreadsheetDoc = null;
try {
log.println("Creating a spreadsheet document");
xSpreadsheetDoc = SOF.createCalcDoc(null);
} catch (com.sun.star.uno.Exception e) {
failed(e.getMessage());
return;
}
XModel xModel = (XModel)
UnoRuntime.queryInterface(XModel.class, xSpreadsheetDoc);
XController xController = xModel.getCurrentController();
//setting value of cell A1
XCell xCell = null;
try {
log.println("Getting spreadsheet") ;
XSpreadsheets oSheets = xSpreadsheetDoc.getSheets() ;
XIndexAccess oIndexSheets = (XIndexAccess)
UnoRuntime.queryInterface(XIndexAccess.class, oSheets);
Object o = oIndexSheets.getByIndex(0);
XSpreadsheet oSheet = (XSpreadsheet)AnyConverter.toObject(
new com.sun.star.uno.Type(XSpreadsheet.class), o);