OdfFileDom contentDoc = doc.getContentDom();
// Remove the default table added in construction
Element spreadsheetElement = ( Element ) contentDoc.getElementsByTagNameNS( OdfNamespace.OFFICE.getUri(),
"spreadsheet" ).item( 0 ); //$NON-NLS-1$
OdfTable table = ( OdfTable ) ( spreadsheetElement.getElementsByTagNameNS( OdfNamespace.TABLE.getUri(),
"table" ).item( 0 ) ); //$NON-NLS-1$
table.getParentNode().removeChild( table );
// create the table
table = new OdfTable( contentDoc );
table.setName( "Export" ); //$NON-NLS-1$
Element officeSpreadsheet = ( Element ) contentDoc.getElementsByTagNameNS( OdfNamespace.OFFICE.getUri(),
"spreadsheet" ).item( 0 ); //$NON-NLS-1$
officeSpreadsheet.appendChild( table );
// header
OdfTableRow headerRow = new OdfTableRow( contentDoc );
table.appendChild( headerRow );
LinkedHashMap<String, Short> attributeNameMap = new LinkedHashMap<String, Short>();
if ( this.exportDn )
{
// short cellNum = ( short ) 0;
//attributeNameMap.put( "dn", new Short( cellNum ) ); //$NON-NLS-1$