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/03/22 18:47:13 UTC

[Bug 54744] New: Java BC Dates don't seem to become AD dates when converted to Excel

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

            Bug ID: 54744
           Summary: Java BC Dates don't seem to become AD dates when
                    converted to Excel
           Product: POI
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
          Assignee: dev@poi.apache.org
          Reporter: matthew@ssl.co.uk
    Classification: Unclassified

Creating an BC Date using a new java.text.SimpleDateFormat("dd/MM/yyyy G") and
getting Java to confirm that it is a BC date by getting it print as a string
using the same SimpleDateFormat objext  then using cell.cellSetValue(Date) and
inspect the resulting spreadsheet (Admittedly using libreoffice) it has changed
to an AD date.

-- 
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 54744] Java BC Dates don't seem to become AD dates when converted to Excel

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

--- Comment #2 from Mark B <ma...@tiscali.co.uk> ---
You might have a slight - well large - problem here. As far as I am aware,
Excel is not able to handle dates prior to 1900AD without special add ins. Just
what they are, I do not know and feel that you need to consult an Excel
specialist - try one of the on-line forums for Excel users as a start - to
discover this information.

Commonly, users who need to enter such dates keep them in a simple text format.
This will only work if you do not need to perform date arithmetic using such
values.

-- 
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 54744] Java BC Dates don't seem to become AD dates when converted to Excel

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

Matthew Carey <ma...@ssl.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|unspecified                 |3.9

--- Comment #1 from Matthew Carey <ma...@ssl.co.uk> ---
There is a chance that this is a LibreOffice issue.

-- 
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 54744] Java BC Dates don't seem to become AD dates when converted to Excel

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

--- Comment #3 from Mark B <ma...@tiscali.co.uk> ---
If you just wish to show the year - 1066 AD or 500 BC - then there is a format
trick that I found. Take a look here -
http://answers.microsoft.com/en-us/office/forum/office_2007-excel/using-bc-and-ad-years-in-an-excel-spreadsheet/24f7ec42-de34-4bd0-b284-292a1770b8f7

-- 
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 54744] Java BC Dates don't seem to become AD dates when converted to Excel

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

--- Comment #4 from Matthew Carey <ma...@ssl.co.uk> ---
Thanks, I can live with this as the customer wants reports on a database in
excel format, they will have to put up with fields that contain remote dates
being rendered as strings. But it useful to see the workaround suggested.

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