From 9a59a4116e8f2bf391f574826f6ac5961f1f0a90 Mon Sep 17 00:00:00 2001 From: schrom01 Date: Mon, 25 Sep 2023 20:18:24 +0200 Subject: [PATCH] converting csv to xlsx --- taskExecuter.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/taskExecuter.php b/taskExecuter.php index 1c65d33..3ebc216 100644 --- a/taskExecuter.php +++ b/taskExecuter.php @@ -1,5 +1,6 @@ setDelimiter("\t"); +// If the files uses an encoding other than UTF-8 or ASCII, then tell the reader + $objReader->setInputEncoding('UTF-16LE'); + + $objPHPExcel = $objReader->load($csvFile); + $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); + $objWriter->save($xslxFile); +} + while($latesEndTime - time() > 60){ // If the directory for Tasks is already created if(is_dir($taskDir)) {