- Home
- DevShare
- Forums
- Wiki
- Products & Services
- Downloads
- Documentation
- Webinars
- Store
- Blog
BookModel book = BookModel.Factory.create(); //or JBook book = new JBook();
Document doc = book.getBook().getDocument();
book.initWorkbook();
book.getLock(); try { ... } catch(F1Exception ex){ ... }finally { book.releaseLock(); }
Document doc = new Document(null, getServletContext().getResourceAsStream("/WEB-INF/templates/template.sod"), new DocumentOpenCallback()); BookModel book = BookModel.Factory.create(doc.getBook());
Document doc = new Document(null, path/file.sod, new DocumentOpenCallback()); BookModel book = BookModel.Factory.create(doc.getBook());
The byte array represents the spreadsheet. This byte array could come from a file upload mechanism, a spreadsheet stored in a database, etc.
Document doc = new Document(null, bytearray, new DocumentOpenCallback()); BookModel book = BookModel.Factory.create(doc.getBook());
ReportParameter[] rp = book.getReportParameterCollection().get();
ReportParameter rp = book.getReportParameterCollection().get("ParameterName");
rp.setValue("ParameterValue");
This executes the queries that are part of this workbook object. This is only valid for e.Spreadsheet SOD files
book.getDataSourceCollection().refresh();
int sheetIndex = 0; int sheetsToInsert = 2; book.insertSheets(sheet, sheets);
int numSheets = book.getNumSheets(); book.setNumSheets(numSheets + 1);
book.setEntry(int sheet, int row, int col, "value");
book.setFormula(int sheet, int row, int col, "SUM(A1:B3)");
CellFormat cf = book.getCellFormat(); FillFormat ff = cf.fill(); ff.setForeColor(JBook.color2RGB(Color.RED)); book.setCellFormat(cf, int sheet1, int row1, int col1, int sheet2, int row2, int col2);
saves active cell, active sheet, zoom level, etc
book.saveViewInfo();
doc.fileSaveAs(new java.io.File("path/filename"), DocumentType.EXCEL_97_REPORT_VIEW, new DocumentSaveCallback()); --or doc.fileSaveCopyAs(new java.io.File("path/filename"), DocumentType.EXCEL_97_REPORT_VIEW, new DocumentSaveCallback()); --or doc.fileSave(new DocumentSaveCallback());
doc.fileSaveAs(outputStream, DocumentType.EXCEL_97_REPORT_VIEW, new DocumentSaveCallback()); --or doc.fileSaveCopyAs(outputStream, DocumentType.EXCEL_97_REPORT_VIEW, new DocumentSaveCallback());
HTMLWriter htmlWriter = new HTMLWriter(); htmlWriter.write(book.getBook(), java.io.Writer);
HTMLWriter htmlWriter = new HTMLWriter(); htmlWriter.write(book.getBook(), iSheet1, iRow1, iCol1, iSheet2, iRow2, iCol2, java.io.Writer);