Package org.zkoss.zss.model

Examples of org.zkoss.zss.model.Exporter


    DataValidation dv = dvh.createValidation(dvc, cral);
    sheet.addValidationData(dv);
  }

  public void exportExcel() {
    Exporter expExcel = Exporters.getExporter("excel");
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    expExcel.export(sheet.getBook(), baos);
    Filedownload.save(baos.toByteArray(), "application/file", sheet
        .getBook().getBookName());
  }
View Full Code Here


  public void onClick$export()
    throws InvalidFormatException, IOException, InterruptedException {
   
    applyPrintSetting();
   
    Exporter c = Exporters.getExporter("pdf");
    if (c instanceof Headings) {
      ((Headings)c).enableHeadings(includeHeadings());
    }
   
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
View Full Code Here

  public void onClick$export()
    throws InvalidFormatException, IOException, InterruptedException {
   
    applyPrintSetting();
   
    Exporter c = Exporters.getExporter("html");
    if (c instanceof Headings) {
      ((Headings)c).enableHeadings(includeHeadings());
    }
   
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
View Full Code Here

 
  public static void saveSpreadsheet(Spreadsheet spreadsheet) {
    String filename = spreadsheet.getSrc();
    SpreadSheetMetaInfo info = SpreadSheetMetaInfo.newInstance(filename);
    Book wb = spreadsheet.getBook();
    Exporter c = Exporters.getExporter("excel");
   
    String fileName = getSpreadsheetStorageFolderPath() + info.getHashFileName();
    File file = new File(fileName);   
    FileOutputStream out = null;
    try {
      file.createNewFile();
      out = new FileOutputStream(file);
      c.export(wb, out);
      SpreadSheetMetaInfo.add(info);
    } catch (IOException e) {
      Messagebox.show("Save excel failed");
      e.printStackTrace();
      return;
View Full Code Here

    storeBookInDesktop(spreadsheet);
  }

  public ByteArrayOutputStream exportToExcel() {
    Book wb = spreadsheet.getBook();
      Exporter c = Exporters.getExporter("excel");
      ByteArrayOutputStream out = new ByteArrayOutputStream();
      c.export(wb, out);
    return out;
  }
View Full Code Here

TOP

Related Classes of org.zkoss.zss.model.Exporter

Copyright © 2018 www.massapicom. 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.