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/05/05 10:24:23 UTC

[Bug 57890] New: XSSFImportFromXML does not consider data types

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

            Bug ID: 57890
           Summary: XSSFImportFromXML does not consider data types
           Product: POI
           Version: 3.9-FINAL
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
          Assignee: dev@poi.apache.org
          Reporter: sandra.weber@zuehlke.com

When importing an XML into xlsx spreadsheet (using XSSFImportFromXML) the data
type isn't considered when setting the cell values. All values are saved as
string.

The data type (getXmlDataType: STXmlDataType.Enum) should be considered. The
possible values are available on STXmlDataType as constants.

Patch including fix and a test will follow shortly.

Additional info:
- used POI version: 3.9
- used Excel version: 2010

-- 
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 57890] [PATCH] XSSFImportFromXML does not consider data types

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

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

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

--- Comment #3 from Dominik Stadler <do...@gmx.at> ---
Thanks for the patch, this is now applied via SVN r1703665

-- 
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 57890] [PATCH] XSSFImportFromXML does not consider data types

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

--- Comment #2 from Sandra <sa...@zuehlke.com> ---
Description of the changes made in the patch:

XSSFImportFromXML will now consider the data type defined in the XML schema
when filling the data of the xml into cells. It differentiates between Boolean,
Integer, Data and String. Any unknown data types are handled as Strings. If the
string value can't be parsed into the required data type (e.g. Integer or Date)
it will result in a IllegalArgumentException. 
Currently not all STXmlDataTypes are handled.
For an example refer to the test and test data in the patch.

-- 
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 57890] XSSFImportFromXML does not consider data types

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

--- Comment #1 from Sandra <sa...@zuehlke.com> ---
Created attachment 32714
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=32714&action=edit
Patch including fix and test case

-- 
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 57890] [PATCH] XSSFImportFromXML does not consider data types

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

Sandra <sa...@zuehlke.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All
            Summary|XSSFImportFromXML does not  |[PATCH] XSSFImportFromXML
                   |consider data types         |does not consider data
                   |                            |types

-- 
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 57890] [PATCH] XSSFImportFromXML does not consider data types

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #32714|1                           |0
           is patch|                            |
  Attachment #32714|text/plain                  |application/x-gtar
          mime type|                            |

-- 
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 57890] [PATCH] XSSFImportFromXML does not consider data types

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |PatchAvailable

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