poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 49397] VLOOKUP, OFFSET and COUNTA functions doesn't evaluate
Date Mon, 07 Jun 2010 06:44:50 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=49397

--- Comment #1 from united_zele_3@hotmail.com 2010-06-07 02:44:48 EDT ---
i couldn't upload the code file, so here is it:


File file = new File(path to file);
InputStream is = new FileInputStream(file);
HSSFWorkbook wb = new HSSFWorkbook(is);
HSSFFormulaEvaluator formulaEvaluator = new HSSFFormulaEvaluator(wb);

int countSheets = wb.getNumberOfSheets();
for (int i = 0; i < countSheets - 1; i++) {
    HSSFSheet sheet = wb.getSheetAt(i);
    String name = sheet.getSheetName().split("\\-")[1];
    if (name.equals("MEETNET") {
        int countRows = sheet.getPhysicalNumberOfRows();
        for (int i = 1; i < countRows; i++) {
            Integer internId = null;
            Integer internBereikId = null;
            for (int j = 0; j <countCells; j++) {
                HSSFCell cell = row.getCell(j);

                if (j == 1) {
                    if (cell.getCellType() == HSSFCell.CELL_TYPE_FORMULA) {
                        internBereikId =
formulaEvaluator.evaluateFormulaCell(cell);
                    }
                }
            }
        }
    }
}

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message