Package org.apache.poi.hssf.usermodel

Examples of org.apache.poi.hssf.usermodel.HSSFWorkbook.createName()


    HSSFSheet s = workbook.createSheet("Foo");
    s.createRow(0).createCell(0).setCellValue(1.1);
    s.createRow(1).createCell(0).setCellValue(2.3);
    s.createRow(2).createCell(2).setCellValue(3.1);

    HSSFName name = workbook.createName();
    name.setNameName("testName");
    name.setReference("A1:A2");

    ptgs = HSSFFormulaParser.parse("SUM(testName)", workbook);
    assertTrue("two tokens expected, got "+ptgs.length,ptgs.length == 2);
View Full Code Here


  }
 
  public void testNamedRangeThatLooksLikeCell() {
    HSSFWorkbook wb = new HSSFWorkbook();
    HSSFSheet sheet = wb.createSheet("Sheet1");
    HSSFName name = wb.createName();
    name.setReference("Sheet1!B1");
    name.setNameName("pfy1");

    Ptg[] ptgs;
    try {
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.