Examples of Workbook


Examples of com.aspose.cells.Workbook

public class OpenSaveSpreadSheetAspose
{
  public static void main(String[] args) throws Exception
  {
    //Creating an Workbook object with an Excel file path
    Workbook workbook = new Workbook("data/xlsx4j/pivot.xlsm");
   
    //Saving the Excel file
      workbook.save("data/xlsx4j/pivot-rtt-Aspose.xlsm");
     
      //Print Message
      System.out.println("Worksheet saved successfully.");
  }
View Full Code Here

Examples of com.extentech.formats.XLS.WorkBook

    return true;
  }
   
  //lookup Name object  in Workbook and return handle
  public Name getName(){
      WorkBook b = this.getParentRec().getSheet().getWorkBook();
      // the externsheet reference is negative, there seems to be a problem
      // off the docs.  Just use a placeholder boundsheet, as the PtgRef3D internally will
      // get the value correctly
    //Externsheet x = b.getExternSheet();
      Name n = null;
     
      try{
          n = b.getName(ilbl);
        n.setSheet(this.getParentRec().getSheet());
      }catch(Exception e) {
          ; // it's an AddInFormula... -jm
      }
      //Boundsheet[] bound = x.getBoundSheets(ixti);
View Full Code Here

Examples of jmc.Workbook

        this.password = password;
    this.worksheetNames = worksheetNames;

        try {

            wb = new Workbook(name, password);

        }
        catch (JMCException e) {

            Debug.log(Debug.ERROR, "MinicalcDecoder.constructor:" + e.getMessage());
View Full Code Here

Examples of jxl.Workbook

    super(dataset, parametersMap);
  }

  public JRDataSource createDatasource() throws JRException {
    try {
      Workbook workbook = (Workbook) getParameterValue(JRXlsQueryExecuterFactory.XLS_WORKBOOK);
      if (workbook != null) {
        datasource = new JRXlsDataSource(workbook);
      } else {
        InputStream xlsInputStream = (InputStream) getParameterValue(JRXlsQueryExecuterFactory.XLS_INPUT_STREAM);
        if (xlsInputStream != null) {
View Full Code Here

Examples of jxl.Workbook

            protected void invokeApplication() throws Exception {

                Renderer.instance().render("/simple.xhtml");

                DocumentData data = (DocumentData) Contexts.getEventContext().get("testExport");
                Workbook workbook = Workbook.getWorkbook(new ByteArrayInputStream(((ByteArrayDocumentData)data).getData()));
                Sheet sheet = workbook.getSheet("Developers");
               
                assert sheet != null;

                assert "Daniel Roth".equals(sheet.getCell(0, 0).getContents());
                assert "Nicklas Karlsson".equals(sheet.getCell(0, 1).getContents());
View Full Code Here

Examples of jxl.Workbook

public class JExcelDocumentHandler extends AbstractTypeFileDocumentHandler {

  protected String extractText(InputStream inputStream) throws IOException {
    StringBuffer text=new StringBuffer();
    try {
      Workbook workbook=Workbook.getWorkbook(inputStream);
      for(int cpt = 0; cpt<workbook.getNumberOfSheets(); cpt++) {
        Sheet sheet = workbook.getSheet(cpt);
        extractTextFromSheet(sheet,text);
      }
    } catch(BiffException ex) {
      ex.printStackTrace();
    }
View Full Code Here

Examples of org.apache.poi.hssf.model.Workbook

            }
            else if (ptgs[i] instanceof Ref3DPtg) {
                Ref3DPtg ptg = (Ref3DPtg) ptgs[i];
                short colnum = ptg.getColumn();
                short rownum = ptg.getRow();
                Workbook wb = workbook.getWorkbook();
                HSSFSheet xsheet = workbook.getSheetAt(wb.getSheetIndexFromExternSheetIndex(ptg.getExternSheetIndex()));
                HSSFRow row = xsheet.getRow(rownum);
                HSSFCell cell = (row != null) ? row.getCell(colnum) : null;
                pushRef3DEval(ptg, stack, cell, row, xsheet, workbook);
            }
            else if (ptgs[i] instanceof AreaPtg) {
View Full Code Here

Examples of org.apache.poi.hssf.model.Workbook

              throw new RuntimeException("Not yet handled embedded models")
             } else {
              BOFRecord bof = (BOFRecord)rec;
              switch (bof.getType()) {
               case BOFRecord.TYPE_WORKBOOK:
                 currentmodel = new Workbook();                
               break;
               case BOFRecord.TYPE_WORKSHEET:
                 currentmodel = new Sheet();                                 
               break;
              default:
View Full Code Here

Examples of org.apache.poi.hssf.model.Workbook

        assertEquals(1, wb.getNumberOfNames());
        assertEquals(3, wb.getNumberOfSheets());
       
        // Check all names fit within range, and use
        //  DeletedArea3DPtg
        Workbook w = wb.getWorkbook();
        for(int i=0; i<w.getNumNames(); i++) {
          NameRecord r = w.getNameRecord(i);
          assertTrue(r.getIndexToSheet() <= wb.getNumberOfSheets());
         
          List nd = r.getNameDefinition();
          assertEquals(1, nd.size());
          assertTrue(nd.get(0) instanceof DeletedArea3DPtg);
        }
       
       
        // Delete the 2nd sheet
        wb.removeSheetAt(1);
       
       
        // Re-check
        assertEquals(1, wb.getNumberOfNames());
        assertEquals(2, wb.getNumberOfSheets());
       
        for(int i=0; i<w.getNumNames(); i++) {
          NameRecord r = w.getNameRecord(i);
          assertTrue(r.getIndexToSheet() <= wb.getNumberOfSheets());
         
          List nd = r.getNameDefinition();
          assertEquals(1, nd.size());
          assertTrue(nd.get(0) instanceof DeletedArea3DPtg);
        }
       
       
        // Save and re-load
        wb = writeOutAndReadBack(wb);
        w = wb.getWorkbook();
       
        assertEquals(1, wb.getNumberOfNames());
        assertEquals(2, wb.getNumberOfSheets());
       
        for(int i=0; i<w.getNumNames(); i++) {
          NameRecord r = w.getNameRecord(i);
          assertTrue(r.getIndexToSheet() <= wb.getNumberOfSheets());
         
          List nd = r.getNameDefinition();
          assertEquals(1, nd.size());
          assertTrue(nd.get(0) instanceof DeletedArea3DPtg);
View Full Code Here

Examples of org.apache.poi.hssf.model.Workbook

            }
            else if (ptg instanceof Ref3DPtg) {
                Ref3DPtg refPtg = (Ref3DPtg) ptg;
                int colIx = refPtg.getColumn();
                int rowIx = refPtg.getRow();
                Workbook wb = workbook.getWorkbook();
                HSSFSheet xsheet = workbook.getSheetAt(wb.getSheetIndexFromExternSheetIndex(refPtg.getExternSheetIndex()));
                HSSFRow row = xsheet.getRow(rowIx);
                HSSFCell cell = (row != null) ? row.getCell(colIx) : null;
                stack.push(createRef3DEval(refPtg, cell, row, xsheet, workbook));
            }
            else if (ptg instanceof AreaPtg) {
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.