https://issues.apache.org/bugzilla/show_bug.cgi?id=53642
Priority: P2
Bug ID: 53642
Assignee: [email protected]
Summary: [PATCH] XLS formula evaluation logging
Severity: normal
Classification: Unclassified
Reporter: [email protected]
Hardware: PC
Status: NEW
Version: 3.9-dev
Component: POI Overall
Product: POI
Created attachment 29152
--> https://issues.apache.org/bugzilla/attachment.cgi?id=29152&action=edit
ant-generated patch file (no new files, only changes to existing source)
For a detailed analysis of the formula evalution - especially in cases of
exceptions or wrong results - a detailed logging of the recursive evaluation is
very helpful.
I needed this for a very complex XLS to find the missing POI implementations (I
will add them as separate patch).
Usage documentation with source extract is given in
documentation/content/xdocs/spreadsheet/eval.xml at the end (I did not test the
HTML generation for this).
Changes in detail:
- org/apache/poi/ss/formula/WorkbookEvaluator.java
* The main extension go here, inside evaluateFormula().
* see spreadsheet/eval.xml and source comments for details
* Note: I know, the use of a public static attribute is a no-go for real
code, but this is for specific development use only, simple to use in this way,
and worst case situation is missing or surplus logging.
- SystemOutLogger.java
* added a shortcut of the log level in the output (helps to find good logging
configuration)
- POILogger.java
* made log level constants final
* added string representation for the log levels (used by SystemOutLogger)
- org/apache/poi/hssf/usermodel/HSSFSheet.java
* Bugfix for logging because "cval" is not always an instance of Record
(results in ClassCastExceptions when logging is on debug level).
* added {..} around some not very simple one-line if-blocks
Tested with HSSFWorkbook only.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]