In your code you are writing strings, not times:
$worksheet1->write(1, 0, "9:59 AM", $timeFormat );
$worksheet1->write(2, 0, "10:00 AM", $timeFormat );
Instead you need to do something like this
$worksheet1->write_date_time(1, 0, "T09:59", $timeFormat);
$worksheet1->write_date_time(2, 0, "T10:00", $timeFormat);
See the Dates in Excel and write_date_time() sections of the Spreadsheet::WriteExcel documentation for more details.
John.
--
|