if ( meta.isAppend() && targetFile.exists() ) { Workbook targetFileWorkbook = Workbook.getWorkbook( targetFile ); data.workbook = Workbook.createWorkbook( targetFile, targetFileWorkbook ); data.workbook = Workbook.createWorkbook( data.outputStream, data.ws ); data.workbook = Workbook.createWorkbook( targetFile, targetFileWorkbook ); } else { data.outputStream = KettleVFS.getOutputStream( data.file, false ); data.workbook = Workbook.createWorkbook( data.outputStream, templateWorkbook );
workbook = Workbook.createWorkbook(file); WritableSheet sheet = workbook.createSheet(clz.getSimpleName(), 0); int r = 0, c = 0;
workbook = Workbook.createWorkbook(file); WritableSheet sheet = workbook.createSheet(clz.getSimpleName(), 0); int r = 0, c = 0;
/** * write into excel file. * * @param map * @param testSummatyField * @throws IOException * @throws WriteException */ public void write(Map<String, TestResult> map, String[] testSummatyField) throws IOException, WriteException { log.info("Writing file : " + inputFile); File file = new File(inputFile); WorkbookSettings wbSettings = new WorkbookSettings(); wbSettings.setLocale(new Locale("en", "EN")); WritableWorkbook workbook = Workbook.createWorkbook(file, wbSettings); workbook.createSheet("PerformanceBenchmark", 0); WritableSheet excelSheet = workbook.getSheet(0); createLabel(excelSheet, testSummatyField); createContent(excelSheet, map); workbook.write(); workbook.close(); }
WritableWorkbook workbook = Workbook.createWorkbook(fout); for (int qindex = 0; qindex < queryConditions.size(); qindex++) { QueryCondition queryCondition = queryConditions.get(qindex);
public void open() { try { if (file != null) { workbook = Workbook.createWorkbook(file); } else if (output != null) { workbook = Workbook.createWorkbook(output); } else { throw new IllegalStateException("no output specified"); } } catch (IOException e) { throw new RuntimeException(e); } }
@Override public ZzExcelCreator createExcel(String pathDir, String name) throws IOException { File dir = new File(pathDir); if (!dir.exists()) dir.mkdirs(); writableWorkbook = Workbook.createWorkbook(new File(pathDir + File.separator + name + ".xls")); return this; }
@Override public ZzExcelCreator openExcel(File file) throws IOException, BiffException { FileInputStream fis = new FileInputStream(file); Workbook wb = Workbook.getWorkbook(fis); writableWorkbook = Workbook.createWorkbook(file, wb); return this; }
/** * Creates a writable workbook with the given file name * * @param file the workbook to copy * @return a writable workbook * @exception IOException */ public static WritableWorkbook createWorkbook(java.io.File file) throws IOException { return createWorkbook(file, new WorkbookSettings()); }
/** * Creates a writable workbook with the given file name * * @param file the workbook to copy * @return a writable workbook * @exception IOException */ public static WritableWorkbook createWorkbook(java.io.File file) throws IOException { return createWorkbook(file, new WorkbookSettings()); }
/** * Creates a writable workbook. When the workbook is closed, * it will be streamed directly to the output stream. In this * manner, a generated excel spreadsheet can be passed from * a servlet to the browser over HTTP * * @param os the output stream * @return the writable workbook * @exception IOException */ public static WritableWorkbook createWorkbook(OutputStream os) throws IOException { return createWorkbook(os, new WorkbookSettings()); }
private WritableWorkbook createWorkbook(File workbookFile) { WritableWorkbook writableWorkBook = null; try { writableWorkBook = Workbook.createWorkbook(workbookFile); } catch (IOException ex) { PrintTools.error(this, "Failed to open Excel workbook. " + workbookFile); } return writableWorkBook; }
private WritableWorkbook openExistingSpreadsheet() throws BiffException, IOException { return Workbook.createWorkbook(outputFile, Workbook.getWorkbook(outputFile)); }
private WritableWorkbook openExistingSpreadsheet() throws BiffException, IOException { return Workbook.createWorkbook(outputFile, Workbook.getWorkbook(outputFile)); }
private WritableWorkbook openExistingSpreadsheet() throws BiffException, IOException { return Workbook.createWorkbook(outputFile, Workbook.getWorkbook(outputFile)); }
/** * Creates a writable workbook as a copy of * the workbook passed in. Once created, the contents of the writable * workbook may be modified * * @param os the stream to write to * @param in the workbook to copy * @return a writable workbook * @exception IOException */ public static WritableWorkbook createWorkbook(OutputStream os, Workbook in) throws IOException { return createWorkbook(os, in, ((WorkbookParser) in).getSettings()); }
protected void openWorkbook(OutputStream os) throws JRException { try { workbook = Workbook.createWorkbook(os); } catch (IOException e) { throw new JRException("Error generating XLS report : " + jasperPrint.getName(), e); } }
/** * Opens a workbook with UTF-8 encoding. */ private static WritableWorkbook openWorkbook( OutputStream outputStream ) throws IOException { WorkbookSettings ws = new WorkbookSettings(); ws.setEncoding( "UTF-8" ); return Workbook.createWorkbook( outputStream, ws ); } }
public ExcelOutputHandler(String path, FacesContext fc, String title) { super(path); try{ WorkbookSettings settings = new WorkbookSettings(); settings.setLocale(fc.getViewRoot().getLocale()); workbook = Workbook.createWorkbook(super.getFile()); sheet = workbook.createSheet(title, 0); this.mimeType = "application/vnd.ms-excel"; } catch(IOException ioe){ ioe.printStackTrace(); } }
public static JexcelTransformer createTransformer(InputStream is, OutputStream os) throws IOException, BiffException { Workbook workbook = Workbook.getWorkbook(is); WritableWorkbook writableWorkbook = Workbook.createWorkbook(os, workbook); JexcelTransformer transformer = new JexcelTransformer(workbook, writableWorkbook); transformer.readCellData(); return transformer; }