Package org.apache.poi.hssf.record.formula

Examples of org.apache.poi.hssf.record.formula.NamePtg.toFormulaString()


        AbstractFunctionPtg tfunc = (AbstractFunctionPtg) ptg[0];
        assertEquals("externalflag", tfunc.getName());

        NamePtg tname = (NamePtg) ptg[1];
        assertEquals("FOO", tname.toFormulaString(w));
    }

    public void testEmbeddedSlash() {
        FormulaParser fp = new FormulaParser("HYPERLINK(\"http://www.jakarta.org\",\"Jakarta\");",null);
        fp.parse();
View Full Code Here


    HSSFWorkbook w = new HSSFWorkbook();
    Ptg[] ptg = FormulaParser.parse("FOO()", w);

    // the name gets encoded as the first arg
    NamePtg tname = (NamePtg) ptg[0];
    assertEquals("FOO", tname.toFormulaString(w));

    AbstractFunctionPtg tfunc = (AbstractFunctionPtg) ptg[1];
    assertTrue(tfunc.isExternalFunction());
  }
View Full Code Here

    Ptg[] ptg = HSSFFormulaParser.parse("myFunc()", w);
    // myFunc() actually takes 1 parameter.  Don't know if POI will ever be able to detect this problem

    // the name gets encoded as the first arg
    NamePtg tname = (NamePtg) ptg[0];
    assertEquals("myFunc", tname.toFormulaString(book));

    AbstractFunctionPtg tfunc = (AbstractFunctionPtg) ptg[1];
    assertTrue(tfunc.isExternalFunction());
  }
View Full Code Here

        fp.parse();
        Ptg[] ptg = fp.getRPNPtg();

        // the name gets encoded as the first arg
        NamePtg tname = (NamePtg) ptg[0];
        assertEquals("FOO", tname.toFormulaString(w));

        AbstractFunctionPtg tfunc = (AbstractFunctionPtg) ptg[1];
        assertTrue(tfunc.isExternalFunction());
    }
View Full Code Here

    Ptg[] ptg = HSSFFormulaParser.parse("myFunc()", w);
    // myFunc() actually takes 1 parameter.  Don't know if POI will ever be able to detect this problem

    // the name gets encoded as the first arg
    NamePtg tname = (NamePtg) ptg[0];
    assertEquals("myFunc", tname.toFormulaString(book));

    AbstractFunctionPtg tfunc = (AbstractFunctionPtg) ptg[1];
    assertTrue(tfunc.isExternalFunction());
  }
View Full Code Here

        AbstractFunctionPtg tfunc = (AbstractFunctionPtg) ptg[0];
        assertEquals("externalflag", tfunc.getName());

        NamePtg tname = (NamePtg) ptg[1];
        assertEquals("FOO", tname.toFormulaString(w));
    }

    public void testEmbeddedSlash() {
        FormulaParser fp = new FormulaParser("HYPERLINK(\"http://www.jakarta.org\",\"Jakarta\");",null);
        fp.parse();
View Full Code Here

    Ptg[] ptg = HSSFFormulaParser.parse("myFunc()", w);
    // myFunc() actually takes 1 parameter.  Don't know if POI will ever be able to detect this problem

    // the name gets encoded as the first arg
    NamePtg tname = (NamePtg) ptg[0];
    assertEquals("myFunc", tname.toFormulaString(book));

    AbstractFunctionPtg tfunc = (AbstractFunctionPtg) ptg[1];
    assertTrue(tfunc.isExternalFunction());
  }
View Full Code Here

        fp.parse();
        Ptg[] ptg = fp.getRPNPtg();

        // the name gets encoded as the first arg
        NamePtg tname = (NamePtg) ptg[0];
        assertEquals("FOO", tname.toFormulaString(w));

        AbstractFunctionPtg tfunc = (AbstractFunctionPtg) ptg[1];
        assertTrue(tfunc.isExternalFunction());
    }
View Full Code Here

    HSSFWorkbook w = new HSSFWorkbook();
    Ptg[] ptg = FormulaParser.parse("FOO()", w);

    // the name gets encoded as the first arg
    NamePtg tname = (NamePtg) ptg[0];
    assertEquals("FOO", tname.toFormulaString(w));

    AbstractFunctionPtg tfunc = (AbstractFunctionPtg) ptg[1];
    assertTrue(tfunc.isExternalFunction());
  }
View Full Code Here

        AbstractFunctionPtg tfunc = (AbstractFunctionPtg) ptg[0];
        assertEquals("externalflag", tfunc.getName());

        NamePtg tname = (NamePtg) ptg[1];
        assertEquals("FOO", tname.toFormulaString(w));
    }

    public void testEmbeddedSlash() {
        FormulaParser fp = new FormulaParser("HYPERLINK(\"http://www.jakarta.org\",\"Jakarta\");",null);
        fp.parse();
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.