Closed jcabanillas closed 3 years ago
Hi! You can set the format as 'format' => 'H:MM'
For example:
// Ex. #1
$rowData = ['2:55', '3:20'];
$sheet->writeRow($rowData, ['format' => 'H:MM']);
// Ex. #2
$header = [
'Time column' => 'H:MM',
];
$sheet->writeHeader($header);
$sheet->writeRow($rowData);
// Ex. #3
// You need define column format before wtiting data
$sheet->setColFormat('A', 'H:MM');
$sheet->writeRow($rowData);
// Ex. #4
// Write formula with format
$sheet->setValue('A3', '=A1+A2', ['format' => 'H:MM']);
// ... and so on
Hello, The sum of times is wrong because the correct format should be [h]:mm How can I manage this format with your library?