} catch (com.sun.star.lang.IllegalArgumentException e) {
e.printStackTrace(log);
throw new StatusException( "Couldn't get a spreadsheet", e);
}
XSubTotalCalculatable xSTC = (XSubTotalCalculatable)
UnoRuntime.queryInterface(XSubTotalCalculatable.class, oSheet);
SubTotalColumn[] columns = new SubTotalColumn[1];
SubTotalColumn column = new SubTotalColumn();
column.Column = 3;
column.Function = GeneralFunction.SUM;
columns[0] = column;
XSubTotalDescriptor desc = xSTC.createSubTotalDescriptor(true);
desc.addNew(columns, 1);
XInterface oObj = desc;
TestEnvironment tEnv = new TestEnvironment(oObj);