You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2016/11/08 09:29:27 UTC
[Bug 60352] New: XSSFExcelExtractor extracts "null" as text from
empty cells
https://bz.apache.org/bugzilla/show_bug.cgi?id=60352
Bug ID: 60352
Summary: XSSFExcelExtractor extracts "null" as text from empty
cells
Product: POI
Version: 3.16-dev
Hardware: PC
OS: Mac OS X 10.1
Status: NEW
Severity: normal
Priority: P2
Component: XSSF
Assignee: dev@poi.apache.org
Reporter: cos.marginean@gmail.com
Target Milestone: ---
We use XSSFExcelExtractor as a mechanism to extract the complete text in an
Excel file, however it seems that in certain circumstances the "null" value is
extracted from an empty cell.
For example:
> Breakdown of data generated by project, technology, submitting centre null > null null null null null
> null null null null null null null
> null Abbreviation Definitions null null null null null
> null Platform Definition null null null null
> null LS454 454 Roche Genome Sequencer FLX System null null null
The patch is relatively simple (and I'm happy to create a PR for it on GitHub).
All we need to is to wrap the last two lines in
XSSFExcelExtractor.handleNonStringCell() with a null check
> if (contents != null) {
> checkMaxTextSize(text, contents);
> text.append(contents);
> }
This would then perform as expected and extract this text instead.
> Breakdown of data generated by project, technology, submitting centre
>
> Abbreviation Definitions
> Platform Definition
> LS454 454 Roche Genome Sequencer FLX System
We believe that an empty string is the preferred option here, because the text
"null" itself might be used as cell contents in certain cases. In that
situation it's difficult to discriminate between these occurrences (is it the
text "null" or is the cell empty?)
Looking forward to hearing your thoughts.
--
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
[Bug 60352] XSSFExcelExtractor extracts "null" as text from empty
cells
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60352
--- Comment #4 from Cosmin Marginean <co...@gmail.com> ---
Created attachment 36062
--> https://bz.apache.org/bugzilla/attachment.cgi?id=36062&action=edit
File that reproduces this
--
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
[Bug 60352] XSSFExcelExtractor extracts "null" as text from empty
cells
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60352
--- Comment #3 from m.ion@oodrive.com <m....@oodrive.com> ---
Is it possible to have a sample file to reproduce the bug, please?
Regards,
M. Ion
--
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
[Bug 60352] XSSFExcelExtractor extracts "null" as text from empty
cells
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60352
--- Comment #2 from Cosmin Marginean <co...@gmail.com> ---
Great! Many thanks!
--
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
[Bug 60352] XSSFExcelExtractor extracts "null" as text from empty
cells
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60352
--- Comment #5 from Cosmin Marginean <co...@gmail.com> ---
Hi Marian.
I tried replying to your email earlier today but it bounced (Recipient address
rejected)
Attached is a sample file for this. Please note this bug seems to be solved in
3.17.
Regards
Cos
--
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
[Bug 60352] XSSFExcelExtractor extracts "null" as text from empty
cells
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60352
Dominik Stadler <do...@gmx.at> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #1 from Dominik Stadler <do...@gmx.at> ---
Fixed via r1794260, should be included in release 3.17-beta1, thanks for the
report and the suggested fix.
--
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