On my Mac Os, I exported Numbers to Excel, In which sheet, I had a date type column.
But when I use "load" function in Classes/PHPExcle/Reader/Excel2007.php, I found a mistake.
this is the styles.xml when I unzip my excel from Numbers
'\<numFmt numFmtId="59" formatCode="yyyy-mm-dd"\/>'
this is the styles.xml when I unzip my excel from google excel
'\<numFmt numFmtId="164" formatCode="yyyy-mm-dd"\/>'
this is the code of my phpexcel:1.8.0, in Classes/PHPExcle/Reader/Excel2007.php.
if ($xf["numFmtId"]) {
if (isset($numFmts)) {
$tmpNumFmt = self::array_item($numFmts->xpath("sml:numFmt[@numFmtId=$xf[numFmtId]]"));
if (isset($tmpNumFmt["formatCode"])) {
$numFmt = (string) $tmpNumFmt["formatCode"];
}
}
if ((int)$xf["numFmtId"] < 164) {
$numFmt = PHPExcel_Style_NumberFormat::builtInFormatCode((int)$xf["numFmtId"]);
}
}
From the code, we can see, using the 'formatCode', I can get the '$numFmt' correctly, But the 'numFmtId' in the styles.xml from Numbers is '59', so I get the result of '$numFmt' is 't0', but not ''yyyy-mm-dd.
And when I using the 'rangeToArray' function in Classes/PHPExcle/Reader/Excel2007.php, I can't get the date type correctly.
Hi
On my Mac Os, I exported Numbers to Excel, In which sheet, I had a date type column. But when I use "load" function in Classes/PHPExcle/Reader/Excel2007.php, I found a mistake.
this is the styles.xml when I unzip my excel from Numbers '\<numFmt numFmtId="59" formatCode="yyyy-mm-dd"\/>'
this is the styles.xml when I unzip my excel from google excel '\<numFmt numFmtId="164" formatCode="yyyy-mm-dd"\/>'
this is the code of my phpexcel:1.8.0, in Classes/PHPExcle/Reader/Excel2007.php. if ($xf["numFmtId"]) { if (isset($numFmts)) { $tmpNumFmt = self::array_item($numFmts->xpath("sml:numFmt[@numFmtId=$xf[numFmtId]]"));
}
From the code, we can see, using the 'formatCode', I can get the '$numFmt' correctly, But the 'numFmtId' in the styles.xml from Numbers is '59', so I get the result of '$numFmt' is 't0', but not ''yyyy-mm-dd. And when I using the 'rangeToArray' function in Classes/PHPExcle/Reader/Excel2007.php, I can't get the date type correctly.