// remote servie manager and the desktop object.
com.sun.star.frame.XDesktop xDesktop = null;
xDesktop = getDesktop();
// create a sheet document
XSpreadsheetDocument xSheetdocument = null;
xSheetdocument = ( XSpreadsheetDocument ) createSheetdocument( xDesktop );
System.out.println( "Create a new Spreadsheet" );
// get the collection of all sheets from the document
XSpreadsheets xSheets = null;
xSheets = (XSpreadsheets) xSheetdocument.getSheets();
// the Action Interface provides methods to hide actions,
// like inserting data, on a sheet, that increase the performance
XActionLockable xActionInterface = null;
xActionInterface = (XActionLockable) UnoRuntime.queryInterface(