https://bz.apache.org/ooo/show_bug.cgi?id=80758
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- Status|CONFIRMED |RESOLVED Resolution|--- |NOT_AN_OOO_ISSUE Summary|Bad date format imported |Format of <NumberFormat |from Excel XML |ss:Format="Short Date"/> is | |not saved by Excel into | |Excel 2003 XML, and cannot | |be imported reliably Keywords| |ms_interoperability --- Comment #7 from [email protected] --- (In reply to yuko from comment #2) > This issue occurs in OOo 3.0. > The date format "YYYY/MM/DD" in Excel is displayed as "DD-MM-YY" in OOo Calc. > Please see the attached screenshot. In Excel or in Windows? Nothing in your file has the "YYYY/MM/DD" format. For example this cell: ---snip--- <Cell ss:Index="7" ss:StyleID="s20"> <Data ss:Type="DateTime">2005-11-01T00:00:00.000</Data> </Cell> ---snip--- has ss:StyleID="s20", which has: ---snip--- <Style ss:ID="s20"> <Alignment ss:Horizontal="Left" ss:Vertical="Center"/> <Borders> <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/> <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/> <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/> </Borders> <NumberFormat ss:Format="Short Date"/> </Style> ---snip--- Note how ss:Format="Short Date", there is nowhere in that entire file that I see your "YYYY/MM/DD" format. The interpretation of "Short Date" is specific to each Windows installation! We just translate "Short Date" to some hardcoded default value in main/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl: ---snip--- 3535 <xsl:when test="$posed-number-format-unit = 'Short Date'"> 3536 <number:day number:style="short"/> 3537 <number:text>-</number:text> 3538 <number:month number:style="short"/> 3539 <number:text>-</number:text> 3540 <number:year number:style="short"/> 3541 </xsl:when> ---snip--- If Excel does not preserve the definition of the Windows "Short Date" anywhere in the file, even Excel cannot accurately recover that date format on another Windows installation, and we certainly cannot do any better. Resolving NOT_AN_OOO_ISSUE. Please save your file with a custom format that is preserved, as the meaning of "Short Date" is unreliable. -- You are receiving this mail because: You are on the CC list for the issue. You are the assignee for the issue.
