79264835

Date: 2024-12-09 11:46:21
Score: 1
Natty:
Report link

As suggested here: https://github.com/PHPOffice/PhpSpreadsheet/discussions/4265#discussioncomment-11488292

The solution is:

if (method_exists($spreadsheet, 'setExcelCalendar')) {
    $spreadsheet->setExcelCalendar(Date::CALENDAR_MAC_1904);
} else {
    Date::setExcelCalendar(Date::CALENDAR_MAC_1904);
}
Reasons:
  • Whitelisted phrase (-1): solution is
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Michele