public void setCellRangeName(String cellRangeName) {
try {
OdfElement contentRoot = maOwnerTable.mDocument.getContentRoot();
//create name range element
OdfFileDom contentDom = ((OdfFileDom) maOwnerTable.getOdfElement().getOwnerDocument());
TableNamedExpressionsElement nameExpress = (TableNamedExpressionsElement) OdfXMLFactory.newOdfElement(
contentDom,
OdfName.newName(OdfDocumentNamespace.TABLE, "named-expressions"));
String startCellRange = "$" + maOwnerTable.getTableName() + "." + maOwnerTable.getAbsoluteCellAddress(mnStartColumn, mnStartRow);
String endCellRange = "$" + maOwnerTable.getTableName() + "." + maOwnerTable.getAbsoluteCellAddress(mnEndColumn, mnEndRow);
TableNamedRangeElement nameRange = (TableNamedRangeElement) nameExpress.newTableNamedRangeElement(startCellRange + ":" + endCellRange, cellRangeName);
nameRange.setTableBaseCellAddressAttribute(endCellRange);
contentRoot.appendChild(nameExpress);
msCellRangeName = cellRangeName;
} catch (Exception ex) {
Logger.getLogger(OdfTableCellRange.class.getName()).log(Level.SEVERE, null, ex);