/** returns the sheet with the given index */
 public XCellRange getSheet(int index) throws com.sun.star.uno.Exception {
   XIndexAccess sheets = UnoRuntime.queryInterface(XIndexAccess.class, getSheets());
   return UnoRuntime.queryInterface(XCellRange.class, sheets.getByIndex(index));
 }
 /** returns the sheets collection */
 public XSpreadsheets getSheets() {
   XSpreadsheetDocument spreadsheetDoc =
       UnoRuntime.queryInterface(XSpreadsheetDocument.class, getDocument());
   return spreadsheetDoc.getSheets();
 }