Package org.apache.poi.ss.formula.ptg

Examples of org.apache.poi.ss.formula.ptg.ArrayPtg$Initial


    Object[][] values2d = new Object[nRows][];
    rowsData.toArray(values2d);
    int nColumns = values2d[0].length;
    checkRowLengths(values2d, nColumns);

    return new ParseNode(new ArrayPtg(values2d));
  }
View Full Code Here


    Ptg[] ptgs;
    ptgs = parseFormula("mode({1,2,2,#REF!;FALSE,3,3,2})");
    confirmTokenClasses(ptgs, ArrayPtg.class, FuncVarPtg.class);
    assertEquals("{1,2,2,#REF!;FALSE,3,3,2}", ptgs[0].toFormulaString());

    ArrayPtg aptg = (ArrayPtg) ptgs[0];
    Object[][] values = aptg.getTokenArrayValues();
    assertEquals(ErrorConstant.valueOf(HSSFErrorConstants.ERROR_REF), values[0][3]);
    assertEquals(Boolean.FALSE, values[1][0]);
  }
View Full Code Here

    private void assert_bug50244(NameRecord nr){
        assertEquals("wDataGruppeSerie.", nr.getNameText());
        Ptg[] ptg = nr.getNameDefinition();
        assertEquals(1, ptg.length);
        ArrayPtg arr = (ArrayPtg)ptg[0];
        assertEquals(696, arr.getRowCount());
        assertEquals(1, arr.getColumnCount());
        Object[][] vals = arr.getTokenArrayValues();
        assertEquals("1.T20.001", vals[0][0]);
        assertEquals("1.T20.010", vals[vals.length - 1][0]);
    }
View Full Code Here

    private void assert_bug50244(NameRecord nr){
        assertEquals("wDataGruppeSerie.", nr.getNameText());
        Ptg[] ptg = nr.getNameDefinition();
        assertEquals(1, ptg.length);
        ArrayPtg arr = (ArrayPtg)ptg[0];
        assertEquals(696, arr.getRowCount());
        assertEquals(1, arr.getColumnCount());
        Object[][] vals = arr.getTokenArrayValues();
        assertEquals("1.T20.001", vals[0][0]);
        assertEquals("1.T20.010", vals[vals.length - 1][0]);
    }
View Full Code Here

    Ptg[] ptgs;
    ptgs = parseFormula("mode({1,2,2,#REF!;FALSE,3,3,2})");
    confirmTokenClasses(ptgs, ArrayPtg.class, FuncVarPtg.class);
    assertEquals("{1,2,2,#REF!;FALSE,3,3,2}", ptgs[0].toFormulaString());

    ArrayPtg aptg = (ArrayPtg) ptgs[0];
    Object[][] values = aptg.getTokenArrayValues();
    assertEquals(ErrorConstant.valueOf(HSSFErrorConstants.ERROR_REF), values[0][3]);
    assertEquals(Boolean.FALSE, values[1][0]);
  }
View Full Code Here

TOP

Related Classes of org.apache.poi.ss.formula.ptg.ArrayPtg$Initial

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.