1

Ok, so i have an excel file "file1.xlsx" formatted like this:

   A      B       C
1 xxxx 4/30/2019 xxxxx
2 xxxx 5/31/2019 xxxxx

And if I try using PHPSpreadsheet to read the column B like this:

$spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load('file1.xlsx');
$sheet = $spreadsheet->getActiveSheet();
for ($i = 1; $i <= $sheet->getHighestRow(); $i++) {
  echo $sheet->getCell("B$i") . " ";
}

I get this result: 43585 43616

I have no idea what could be causing this. These numbers do not appear anywhere in the spreadsheet, and after some testing I noticed that it doesn't happen on all dates, just some. Can anyone let me know what could be causing this and/or what I can do to fix it? Thank you.

Cryptify
  • 17
  • 4
  • Dates are saved as timestamps in excel. Does this answer your question? https://stackoverflow.com/questions/44304795/how-to-retrieve-date-from-table-cell-using-phpspreadsheet – ffx14 Jul 15 '20 at 13:12
  • Does this answer your question? [How to retrieve date from table cell using PhpSpreadsheet?](https://stackoverflow.com/questions/44304795/how-to-retrieve-date-from-table-cell-using-phpspreadsheet) – ffx14 Jul 15 '20 at 13:14

0 Answers0