1
나는 출력으로 웹에서 내 엑셀 파일의 데이터를합니다.내가 어떻게 PHPExcel에서 날짜로 셀 값의 형식을합니까?
A000001 | John Doe | DR | 41456 | 41465<-- // this should be date
A000002 | Philip Moris | CP | 41456 | 41465 // formatted as yyyy-mm-dd
require_once("controller/xls/Classes/PHPExcel/IOFactory.php");
$objPHPExcel = PHPExcel_IOFactory::load($filer);
foreach ($objPHPExcel->getWorksheetIterator() as $worksheet)
{
$worksheetTitle = $worksheet->getTitle();
$highestRow = $worksheet->getHighestRow(); // e.g. 10
$highestColumn = $worksheet->getHighestColumn(); // e.g 'F'
$highestColumnIndex = PHPExcel_Cell::columnIndexFromString($highestColumn);
$nrColumns = ord($highestColumn) - 64;
echo '<table>';
for ($row = 5; $row <= $highestRow; ++ $row)
{
echo '<tr>';
for ($col = 1; $col < $highestColumnIndex; ++ $col)
{
$cell = $worksheet->getCellByColumnAndRow($col, $row);
$val = $cell->getValue();
echo '<td>'.$val.'</td>';
}
echo '</tr>';
}
echo '</table>';
}
는 유닉스 시간 : 출력 할 때 엑셀에서 셀 하나는이 같은 날짜와 반환으로 포맷? 그렇다면 getCellByColumnAndRow를 사용할 때 어떻게 포맷합니까? 나는 또한 이것을 mysql db에 저장할 것이다. Tnx.
당신에게 감사 매우 굉장합니다! :) – mmr
PHPExcel – periback2