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 2013/08/23 20:11:05 UTC

[Bug 55473] New: DataFormatter.formatCellValue(cell) throws IllegalArgumentException when the format is mm/dd/yyyy;;; and value is 0

https://issues.apache.org/bugzilla/show_bug.cgi?id=55473

            Bug ID: 55473
           Summary: DataFormatter.formatCellValue(cell) throws
                    IllegalArgumentException when the format is
                    mm/dd/yyyy;;; and value is 0
           Product: POI
           Version: unspecified
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: POI Overall
          Assignee: dev@poi.apache.org
          Reporter: narayan1ap@gmail.com

Created attachment 30756
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=30756&action=edit
A Xlsx file which has first row formatted with custom format mm/dd/yyyy;;; and
contains value 0

DataFormatter.formatCellValue(cell) throws IllegalArgumentException when the
format of a cell is is mm/dd/yyyy;;; and value is 0.

Actually df.formatCellValue(cell); this API returns correct date for non zero
numbers and negative numbers it returns negactive values But for value 0 for
some reason it is throwing IllegalArgumentExeption.

-- 
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 55473] DataFormatter.formatCellValue(cell) throws IllegalArgumentException when the format is mm/dd/yyyy;;; and value is 0

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

--- Comment #1 from Narayan <na...@gmail.com> ---
Created attachment 30792
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=30792&action=edit
Java File for reading excel which gives IllegalArgumentException.

-- 
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 55473] DataFormatter.formatCellValue(cell) throws IllegalArgumentException when the format is mm/dd/yyyy;;; and value is 0

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

Patrick Cheng <pa...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |patrickyccheng@gmail.com

-- 
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 55473] DataFormatter.formatCellValue(cell) throws IllegalArgumentException when the format is mm/dd/yyyy;;; and value is 0

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

Narayan <na...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P1
                 CC|                            |narayan1ap@gmail.com
          Component|POI Overall                 |XSSF
            Version|unspecified                 |3.7
                 OS|                            |Windows 7
           Severity|normal                      |major

-- 
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 55473] DataFormatter.formatCellValue(cell) throws IllegalArgumentException when the format is mm/dd/yyyy;;; and value is 0

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

Narayan <na...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All
           Severity|major                       |blocker

-- 
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 55473] DataFormatter.formatCellValue(cell) throws IllegalArgumentException when the format is mm/dd/yyyy;;; and value is 0

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

Bodo Wippermann <bo...@bodow.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|3.7                         |3.10-dev
           Severity|blocker                     |normal

--- Comment #2 from Bodo Wippermann <bo...@bodow.de> ---
still in 3.10_beta1 

but it seems to be the result of the custom format. it ends up in an empty
Format String for the zero value. 

It is mentioned in a comment in the org.apache.poi.ss.usermodel.DataFormatter
Class. The comment that it requires refactoring of other code.

-- 
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 55473] DataFormatter.formatCellValue(cell) throws IllegalArgumentException when the format is mm/dd/yyyy;;; and value is 0

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

--- Comment #3 from Narayan <na...@gmail.com> ---
Thanks Bodo. 

We also found a similar issue with the CellFormat. 
If you try to get the cellformat for three consequtive semicolons then array
index out of bound exception observed. 

CellFormat.getInstance(";;;");

This format is supported by the MS Excel by the way.

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