Examples of OdfFileDom


Examples of org.openoffice.odf.doc.OdfFileDom

        // export
        try
        {
            OdfSpreadsheetDocument doc = OdfSpreadsheetDocument.createSpreadsheetDocument();
            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 );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.