@@ -225,7 +225,7 @@ private function getPreviewData(Worksheet $worksheet): array {
225225 && $ columns [$ colIndex ]['type ' ] === Column::TYPE_SELECTION
226226 && $ columns [$ colIndex ]['subtype ' ] === Column::SUBTYPE_SELECTION_CHECK )
227227 ) {
228- $ value = $ cell ->getFormattedValue () === 'TRUE ' ? 'true ' : 'false ' ;
228+ $ value = in_array ( $ cell ->getFormattedValue (), [ 'TRUE ' , ' 1 ' ], true ) ? 'true ' : 'false ' ;
229229 }
230230
231231 $ rowData [] = $ value ;
@@ -465,7 +465,7 @@ private function upsertRow(Row $row): void {
465465 } elseif ($ column ->getType () === Column::TYPE_SELECTION
466466 && $ column ->getSubtype () === Column::SUBTYPE_SELECTION_CHECK
467467 ) {
468- $ value = $ cell ->getFormattedValue () === 'TRUE ' ? 'true ' : 'false ' ;
468+ $ value = in_array ( $ cell ->getFormattedValue (), [ 'TRUE ' , ' 1 ' ], true ) ? 'true ' : 'false ' ;
469469 }
470470
471471 $ data [] = [
@@ -513,6 +513,7 @@ private function valueToDateTimeImmutable(mixed $value): ?DateTimeImmutable {
513513 }
514514 try {
515515 $ dt = Date::excelToDateTimeObject ($ value );
516+ Date::roundMicroseconds ($ dt );
516517 return DateTimeImmutable::createFromMutable ($ dt );
517518 } catch (TypeError ) {
518519 try {
@@ -702,7 +703,7 @@ private function parseColumnDataType(Cell $cell): array {
702703 }
703704 } elseif ($ originDataType === DataType::TYPE_BOOL
704705 || ($ originDataType === DataType::TYPE_FORMULA
705- && in_array ($ formattedValue , ['FALSE ' , 'TRUE ' ], true ))
706+ && in_array ($ formattedValue , ['FALSE ' , 'TRUE ' , '' , ' 1 ' ], true ))
706707 ) {
707708 $ dataType = [
708709 'type ' => Column::TYPE_SELECTION ,
0 commit comments