[Bug 59200] New: Creating a data validation with prompt text longer than max leads to file failing office validation

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 59200] New: Creating a data validation with prompt text longer than max leads to file failing office validation

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=59200

            Bug ID: 59200
           Summary: Creating a data validation with prompt text longer
                    than max leads to file failing office validation
           Product: POI
           Version: 3.13-FINAL
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: SS Common
          Assignee: [hidden email]
          Reporter: [hidden email]

If you create a DataValidation with a prompt text longer than the excel maximum
(seems to be 32 characters) POI allows this to be made.  However, when opening
the file with excel, assuming protected view is enabled, excel will go to
protected view.  Furthermore, if you open up the data validation from excel you
will not be able to edit the prompt title.

--
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 59200] Creating a data validation with prompt text longer than max leads to file failing office validation

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=59200

Morgan Hull <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All
                 CC|                            |[hidden email]

--
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 59200] Creating a data validation with prompt text longer than max leads to file failing office validation

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=59200

Dominik Stadler <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from Dominik Stadler <[hidden email]> ---
Can you provide a unit-test or at least a code-snippet that shows how you
create the invalid data validation? This would make it much easier for others
to reproduce the problem.

--
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 59200] Creating a data validation with prompt text longer than max leads to file failing office validation

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=59200

Morgan Hull <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #2 from Morgan Hull <[hidden email]> ---
Sorry if this isn't in a reasonable format, I'm completely new to this.

        String promptTitle;
        DataValidation dataValidation;
        CellRangeAddressList headerCell = new
CellRangeAddressList(ImportFileBundleSheets.FIRST_ROW_INDEX,
ImportFileBundleSheets.FIRST_ROW_INDEX, columnNum, columnNum);
        DataValidationConstraint constraint =
sheet.getDataValidationHelper().createCustomConstraint("A1<>\"\"");

        dataValidation = new HSSFDataValidation(headerCell, constraint);
        promptTitle = PortalServices.getI18nString(adminLocale,
GroupImportConstants.PROMPT_TITLE);

        dataValidation.createPromptBox("Some long title that is greater than 32
characters in length", promptDescription);
        dataValidation.setShowErrorBox(false);
        sheet.addValidationData(dataValidation);

--
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 59200] Creating a data validation with prompt text longer than max leads to file failing office validation

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=59200

Dominik Stadler <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Dominik Stadler <[hidden email]> ---
Fixed via r1771254, the spec states a limit for HSSF of 32 length for title and
255 length for text. For XSSF it does not state a limit as far as I saw, but
Excel imposes a 255 length limit for both title and text, so I applied this
limit as well here.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 59200] Creating a data validation with prompt text longer than max leads to file failing office validation

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=59200

--- Comment #4 from Javen O'Neal <[hidden email]> ---
(In reply to Morgan Hull from comment #2)
> Sorry if this isn't in a reasonable format, I'm completely new to this.

It's fine to submit small, trivial changes as a comment, preferably prefixing
each line with "> " so that Bugzilla doesn't text-wrap the code.

If your changes get much bigger or it's ambiguous *what* you're suggesting
should be changed, there's an easier way.

Check out the source code using SVN [1], save your changes in the source code,
then save an svn patch file ("svn diff > patch.txt" or using a graphical
client). Then upload the patch file.
See [2] for more info.

Thanks for contributing!

[1] https://poi.apache.org/subversion.html
[2] https://poi.apache.org/guidelines.html#Submitting+Patches

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 59200] Creating a data validation with prompt text longer than max leads to file failing office validation

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=59200

Dominik Stadler <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #5 from Dominik Stadler <[hidden email]> ---
*** Bug 54662 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: [hidden email]
For additional commands, e-mail: [hidden email]