|| headerColumnNumber < 0 || headerRowNumber > numRows
|| headerColumnNumber > numCols) {
throw new IllegalArgumentException("Can not create table with the given parameters:\n"
+ "Rows " + numRows + ", Columns " + numCols + ", HeaderRows " + headerRowNumber + ", HeaderColumns " + headerColumnNumber);
}
OdfFileDom dom = document.getContentDom();
OdfOfficeAutomaticStyles styles = dom.getAutomaticStyles();
//1. create table element
TableTableElement newTEle = (TableTableElement) OdfXMLFactory.newOdfElement(dom,
OdfName.newName(OdfDocumentNamespace.TABLE, "table"));
String tablename = getUniqueTableName(document);
newTEle.setTableNameAttribute(tablename);