Package org.odftoolkit.odfdom.doc

Examples of org.odftoolkit.odfdom.doc.OdfSpreadsheetDocument.save()


       
        CustomizableTabularExporterUtilities.exportRows(
                project, engine, params, serializer);
       
        try {
            odfDoc.save(outputStream);
        } catch (Exception e) {
            throw new IOException("Error saving spreadsheet",e);
        }
        outputStream.flush();
    }
View Full Code Here


    }
    else if (outpath.getName().endsWith(".ods")) {
      in = FormUtils.class.getResourceAsStream("/forms/ods/bulk_input.ods");
      if (in != null) {
        OdfSpreadsheetDocument oDoc = OdfSpreadsheetDocument.loadDocument(in);
        oDoc.save(outpath);
      }
      else {
        throw new IOException("Could not read from resource.");
      }
    }
View Full Code Here

    }
    else if (outpath.getName().endsWith(".ods")) {
      in = FormUtils.class.getResourceAsStream("/forms/ods/plate_input.ods");
      if (in != null) {
        OdfSpreadsheetDocument oDoc = OdfSpreadsheetDocument.loadDocument(in);
        oDoc.save(outpath);
      }
      else {
        throw new IOException("Could not read from resource.");
      }
    }
View Full Code Here

      table2.setTableName("Sheet2");
      OdfTableCellRange cellRange2 = table2.getCellRangeByPosition("A1","F3");
      OdfTableCell cell2 = table2.getCellByPosition("A1");
      cell2.setStringValue("Merge A1:F3");
      cellRange2.merge();
      ods.save(ResourceUtilities.newTestOutputFile(filename + "MergeExpandCell.ods"));
      table = ods.getTableByName("Sheet1");
      Assert.assertTrue(table.getColumnCount() == 5);
      Assert.assertTrue(table.getRowCount() == 1);
      table = ods.getTableByName("Sheet2");
      Assert.assertTrue(table.getColumnCount() == 6);
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.