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 2015/11/23 22:46:24 UTC

[Bug 58641] New: Support for IgnoredErrors in XSSF

https://bz.apache.org/bugzilla/show_bug.cgi?id=58641

            Bug ID: 58641
           Summary: Support for IgnoredErrors in XSSF
           Product: POI
           Version: unspecified
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
          Assignee: dev@poi.apache.org
          Reporter: peterhansson_se@yahoo.com

Apache POI (XSSF) currently lacks support for IgnoredErrors feature when
writing XLSX files.

More information on this official MS link:

https://msdn.microsoft.com/en-us/library/dd944168%28v=office.12%29.aspx

As can be seen this is an element on the Sheet.

On this feature I suggest to leave XLS format in the dust and *not* implement
it on the usermodel. Most people do not need XLS support anymore and I guess it
is fair to say to users of Apache POI that if they need this feature then they
need to use XSSF. It seems previous attempts to implement this in usermodel
have failed (see bug 54868). Instead I suggest simply to add it as a setter
method on the XSSFSheet.

There are other tickets (bug 54868 and bug 46136) that relate to the same issue
but this RFE is more general, it is not just about specifically ignoring
"number-stored-as-text" warning, but indeed all those warnings supported by
IgnoredErrors element.

Personally I have no interest in being able to *read* this information from a
XLSX file. Being able to persist the setting is far, far more important.

-- 
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 58641] Support for IgnoredErrors in XSSF

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58641

peterhansson_se@yahoo.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |emercoyle@hotmail.com

--- Comment #1 from peterhansson_se@yahoo.com ---
*** Bug 54868 has been marked as a duplicate of this bug. ***

-- 
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 58641] Support for IgnoredErrors in XSSF

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58641

--- Comment #4 from peterhansson_se@yahoo.com ---
Created attachment 33311
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33311&action=edit
Proposal for usermodel implementation

-- 
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 58641] Support for IgnoredErrors in XSSF

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58641

--- Comment #2 from Nick Burch <ap...@gagravarr.org> ---
There's low level record support for this for HSSF, see #46136

If we can't read it back, then it's rather tricky to unit test it if nothing
else!

Bug #56892 has one proposed usermodel implementation for this, but it really
needs a bit more work and to be made more generic. Being able to roughly mirror
behaviour for adding/setting and reading would be a bonus too

Any thoughts on the right usermodel interface for adding 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 58641] Support for IgnoredErrors in XSSF

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58641

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |56892
             Status|NEW                         |NEEDINFO

--- Comment #6 from Dominik Stadler <do...@gmx.at> ---
There has been some work on this via Bug 56892, can you take a look and see how
much of your proposed changes are still missing?

-- 
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 58641] Support for IgnoredErrors in XSSF

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58641

Nick Burch <ap...@gagravarr.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|unspecified                 |3.14-dev
           Severity|normal                      |enhancement
                 OS|                            |All

-- 
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 58641] Support for IgnoredErrors in XSSF

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58641

--- Comment #5 from peterhansson_se@yahoo.com ---
I've attached a proposal for a complete usermodel implementation. 
The proposal is inspired by DataValidation.

The proposal adds an interface named IgnoredError and corresponding new methods
in Sheet:


setters:

addIgnoredError(IgnoredError)
removeIgnoredError(IgnoredError)


getters:

List<? extends IgnoredError> getIgnoredErrors();




I've kept it simple. It is perfectly possible to have overlap in ignore error.

Suppose I add

  For types twoDigitTextYear,numberStoredAsText ignore in cells A1:A5.

and then in addition I add

  For type numberStoredAsText ignore in cell A1.


Now this is obviously redundant wrt to A1: I've told twice that I want
'numberStoredAsText' to be ignored for that cell. I've decided that this is
perfectly acceptable for the simple reason that it is also acceptable in OOXML.
This means implementers of the above shouldn't try to be clever about it and
try to collapse/reduce what has been requested *unless this is specifically
required by the format*.









   - formula
   - formulaRange
   - unlockedFormula
   - emptyCellReference

-- 
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 58641] Support for IgnoredErrors in XSSF

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58641

--- Comment #3 from peterhansson_se@yahoo.com ---
It is kinda similar in concept to DataValidations. I think the usermodel for
that can be re-used as inspiration.

For information: In OOXML there are quite a few types of IgnoredErrors:

   - evalError
   - twoDigitTextYear
   - numberStoredAsText
   - formula
   - formulaRange
   - unlockedFormula
   - emptyCellReference
   - listDataValidation
   - calculatedColumn


This is just to say that 'numberStoredAsText' is just one of many. 

I notice that the XSSF implementation for DataValidation has some utility code
for dealing with 'sqref'. This type of code should be moved out of
DataValidation and into a utils class or something as the same needs to be used
for IgnoredErrors.

-- 
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 58641] Support for IgnoredErrors in XSSF

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58641

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #7 from Dominik Stadler <do...@gmx.at> ---
there was no update here in quite some time, therefore I am setting this to
WONTFIX for now. 

We have support for ignoring errors for regions for XSSF via bug 56892, support
for HSSF is discussed in bug 46136. 

If you would like to propose more changes then please reopen this bug with an
updated patch that applies to the current trunk.

-- 
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