xEx.setSourceDocument(xSheetDoc);
// Setting some string to a cell
XSpreadsheetDocument xSpreadsheetDoc = (XSpreadsheetDocument)
UnoRuntime.queryInterface(XSpreadsheetDocument.class, xSheetDoc);
XSpreadsheets xSpreadsheets = xSpreadsheetDoc.getSheets();
XIndexAccess xSheetsIndexArray = (XIndexAccess)
UnoRuntime.queryInterface(XIndexAccess.class, xSpreadsheets);
XSpreadsheet xSheet = (XSpreadsheet) AnyConverter.toObject(
new Type(XSpreadsheet.class),xSheetsIndexArray.getByIndex(0));
XCell xCell = xSheet.getCellByPosition(0, 0);