// creation of testobject here // first we write what we are intend to do to log file
log.println("Creating a test environment");
// the cell range
CellRangeAddress sCellRangeAddress = new CellRangeAddress();
sCellRangeAddress.Sheet = 0;
sCellRangeAddress.StartColumn = 1;
sCellRangeAddress.StartRow = 0;
sCellRangeAddress.EndColumn = mMaxFieldIndex - 1;
sCellRangeAddress.EndRow = mMaxFieldIndex - 1;
// position of the data pilot table
CellAddress sCellAddress = new CellAddress();
sCellAddress.Sheet = 0;
sCellAddress.Column = 7;
sCellAddress.Row = 8;
log.println("Getting a sheet");
XSpreadsheets xSpreadsheets = xSheetDoc.getSheets();
XSpreadsheet oSheet = null;
XSpreadsheet oSheet2 = null;
XIndexAccess oIndexAccess = UnoRuntime.queryInterface(
XIndexAccess.class, xSpreadsheets); // Make sure there are at least two sheets
xSpreadsheets.insertNewByName("Some Sheet", (short)0);
oSheet = (XSpreadsheet) AnyConverter.toObject( new Type(XSpreadsheet.class),
oIndexAccess.getByIndex(0));
oSheet2 = (XSpreadsheet) AnyConverter.toObject( new Type(XSpreadsheet.class),
oIndexAccess.getByIndex(1));
log.println("Filling a table");
for (int i = 1; i < mMaxFieldIndex; i++) {
oSheet.getCellByPosition(i, 0).setFormula("Col" + i);
oSheet.getCellByPosition(0, i).setFormula("Row" + i);
oSheet2.getCellByPosition(i, 0).setFormula("Col" + i);
oSheet2.getCellByPosition(0, i).setFormula("Row" + i);
}
for (int i = 1; i < mMaxFieldIndex; i++) for (int j = 1; j < mMaxFieldIndex; j++) {
oSheet.getCellByPosition(i, j).setValue(i * (j + 1));
oSheet2.getCellByPosition(i, j).setValue(i * (j + 2));
}
oSheet.getCellByPosition(1, 5);
int x = sCellAddress.Column; int y = sCellAddress.Row + 3;
oSheet.getCellByPosition(x, y);
// create the test objects
log.println("Getting test objects");
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.11Bemerkung:
(vorverarbeitet am 2026-09-12)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.