Examples of Sheet


Examples of org.apache.harmony.x.swing.text.html.cssparser.metamodel.Sheet

        }
    }

    private void parseSheet(final boolean asResolver) {
//        throw new UnsupportedOperationException("CSS parser required!");
        Sheet ss = null;
        try {
            ss = parser.parse();
        } catch (ParseException e) {
            e.printStackTrace();
        }
        addImportedStyleSheets(ss.getImportsIterator(), asResolver);
        addParsedSheet(ss.getRuleSetIterator(), asResolver);
    }
View Full Code Here

Examples of org.apache.pivot.wtk.Sheet

        display.getStyles().put("backgroundColor", new Color(0, 127, 127));
        window1.setContent(new Label("Hello Bar"));
        window1.open(display);

        Sheet sheet = new Sheet();
        sheet.setContent(new Label("Hello Foo"));
        sheet.open(window1);

        Frame window1a = new Frame();
        window1a.setTitle("Window 1 A");
        window1a.setPreferredSize(160, 120);
        window1a.open(window1);
View Full Code Here

Examples of org.apache.poi.hslf.model.Sheet

        CharFlagsTextProp cftp = null;
        if (characterStyle != null){
            cftp = (CharFlagsTextProp)characterStyle.findByName("char_flags");
        }
        if (cftp == null){
            Sheet sheet = parentRun.getSheet();
            int txtype = parentRun.getRunType();
            SlideMaster master = (SlideMaster)sheet.getMasterSheet();
            cftp = (CharFlagsTextProp)master.getStyleAttribute(txtype, getIndentLevel(), "char_flags", true);
        }

    return cftp == null ? false : cftp.getSubValue(index);
  }
View Full Code Here

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

       
        // convert all LabelRecord records to LabelSSTRecord
        convertLabelRecords(records, recOffset);       
        while (recOffset < records.size())
        {
            Sheet sheet = Sheet.createSheet(records, sheetNum++, recOffset );

            recOffset = sheet.getEofLoc()+1;
            if (recOffset == 1)
            {
                break;
            }
View Full Code Here

Examples of org.apache.poi.ss.usermodel.Sheet

      FormulaEvaluator evaluator = wb.getCreationHelper().createFormulaEvaluator();
      evaluateAllFormulaCells(wb, evaluator);
  }
  private static void evaluateAllFormulaCells(Workbook wb, FormulaEvaluator evaluator) {
      for(int i=0; i<wb.getNumberOfSheets(); i++) {
         Sheet sheet = wb.getSheetAt(i);

         for(Row r : sheet) {
            for (Cell c : r) {
               if (c.getCellType() == HSSFCell.CELL_TYPE_FORMULA) {
                  evaluator.evaluateFormulaCell(c);
View Full Code Here

Examples of org.apache.poi.ss.usermodel.Sheet

       assertEquals(3, wb.getNumberOfSheets());
      
       // Try each cell individually
       XSSFFormulaEvaluator eval = new XSSFFormulaEvaluator(wb);
       for(int i=0; i<wb.getNumberOfSheets(); i++) {
          Sheet s = wb.getSheetAt(i);
          for(Row r : s) {
             for(Cell c : r) {
                if(c.getCellType() == Cell.CELL_TYPE_FORMULA) {
                    CellValue cv = eval.evaluate(c);
                    if(cv.getCellType() == Cell.CELL_TYPE_NUMERIC) {
View Full Code Here

Examples of org.apache.poi.ss.usermodel.Sheet

     * Ensure General and @ format are working properly
     *  for integers
     */
    public void test47490() throws Exception {
       XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("GeneralFormatTests.xlsx");
       Sheet s = wb.getSheetAt(1);
       Row r;
       DataFormatter df = new DataFormatter();
      
       r = s.getRow(1);
       assertEquals(1.0, r.getCell(2).getNumericCellValue());
       assertEquals("General", r.getCell(2).getCellStyle().getDataFormatString());
       assertEquals("1", df.formatCellValue(r.getCell(2)));
       assertEquals("1", df.formatRawCellContents(1.0, -1, "@"));
       assertEquals("1", df.formatRawCellContents(1.0, -1, "General"));
             
       r = s.getRow(2);
       assertEquals(12.0, r.getCell(2).getNumericCellValue());
       assertEquals("General", r.getCell(2).getCellStyle().getDataFormatString());
       assertEquals("12", df.formatCellValue(r.getCell(2)));
       assertEquals("12", df.formatRawCellContents(12.0, -1, "@"));
       assertEquals("12", df.formatRawCellContents(12.0, -1, "General"));
      
       r = s.getRow(3);
       assertEquals(123.0, r.getCell(2).getNumericCellValue());
       assertEquals("General", r.getCell(2).getCellStyle().getDataFormatString());
       assertEquals("123", df.formatCellValue(r.getCell(2)));
       assertEquals("123", df.formatRawCellContents(123.0, -1, "@"));
       assertEquals("123", df.formatRawCellContents(123.0, -1, "General"));
View Full Code Here

Examples of org.apache.poi.ss.usermodel.Sheet

       Workbook[] wbs = new Workbook[] {
             new HSSFWorkbook(),
             new XSSFWorkbook()
       };
       for(Workbook wb : wbs) {
          Sheet s = wb.createSheet();
          Row r = s.createRow(0);
         
          // Setup
          Cell cn = r.createCell(0, Cell.CELL_TYPE_NUMERIC);
          cn.setCellValue(1.2);
          Cell cs = r.createCell(1, Cell.CELL_TYPE_STRING);
View Full Code Here

Examples of org.apache.poi.ss.usermodel.Sheet

    }

    public void test49783() throws Exception {
        Workbook wb =  XSSFTestDataSamples.openSampleWorkbook("49783.xlsx");
        Sheet sheet = wb.getSheetAt(0);
        FormulaEvaluator evaluator = wb.getCreationHelper().createFormulaEvaluator();
        Cell cell;

        cell = sheet.getRow(0).getCell(0);
        assertEquals("#REF!*#REF!", cell.getCellFormula());
        assertEquals(Cell.CELL_TYPE_ERROR, evaluator.evaluateInCell(cell).getCellType());
        assertEquals("#REF!", FormulaError.forInt(cell.getErrorCellValue()).getString());

        Name nm1 = wb.getName("sale_1");
        assertNotNull("name sale_1 should be present", nm1);
        assertEquals("Sheet1!#REF!", nm1.getRefersToFormula());
        Name nm2 = wb.getName("sale_2");
        assertNotNull("name sale_2 should be present", nm2);
        assertEquals("Sheet1!#REF!", nm2.getRefersToFormula());

        cell = sheet.getRow(1).getCell(0);
        assertEquals("sale_1*sale_2", cell.getCellFormula());
        assertEquals(Cell.CELL_TYPE_ERROR, evaluator.evaluateInCell(cell).getCellType());
        assertEquals("#REF!", FormulaError.forInt(cell.getErrorCellValue()).getString());
    }
View Full Code Here

Examples of org.apache.poi.ss.usermodel.Sheet

    public void test49156() throws Exception {
        Workbook wb = XSSFTestDataSamples.openSampleWorkbook("49156.xlsx");
        FormulaEvaluator formulaEvaluator = wb.getCreationHelper().createFormulaEvaluator();

        Sheet sheet = wb.getSheetAt(0);
        for(Row row : sheet){
            for(Cell cell : row){
                if(cell.getCellType() == Cell.CELL_TYPE_FORMULA){
                    formulaEvaluator.evaluateInCell(cell); // caused NPE on some cells
                }
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.