poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Blake Watson <blake.wat...@pnmac.com>
Subject Re: Conditional Formatting issue
Date Mon, 23 Oct 2017 16:57:33 GMT
OK: I was not doing it for my example, but adding it in didn't change
anything. I am creating a cell object, but I'm not changing any values (or
formats).

I was able to open the file as well, after some fussing around. I think it
was just something I didn't get about FileInputStream. So I now have the
code in Java and with a stack trace. This produces the error. I'll put the
whole thing up in Bugzilla, then I'll go back and try to find the exact
cause.

public class Main {
    public static void main(String[] args) {
            try {
                Workbook wb = WorkbookFactory.create(new File("condfail.xlsx"));
                Sheet sheet = (wb.getSheet("IRPPCalc"));
                Row row = (sheet.getRow(11));
                XSSFCell cell = (XSSFCell) row.getCell(18);
                WorkbookEvaluatorProvider fe =
(WorkbookEvaluatorProvider)
wb.getCreationHelper().createFormulaEvaluator();
                System.out.println("&&&&");
                ConditionalFormattingEvaluator condfmt = new
ConditionalFormattingEvaluator(wb, fe);
                System.out.println(">>>>" +
condfmt.getConditionalFormattingForCell(cell));
            } catch(Exception e) {e.printStackTrace();};
    }
}

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message