change to SQL

This commit is contained in:
schrom01
2023-02-15 13:31:48 +01:00
parent 20618367e0
commit 67c5550de6
2 changed files with 21 additions and 33 deletions
+2 -12
View File
@@ -1,19 +1,9 @@
<?php
require $_SERVER['DOCUMENT_ROOT'] . '/spreadSheetReader/SimpleXLSX.php';
require $_SERVER['DOCUMENT_ROOT'] . '/spreadSheetReader/SimpleXLSXGen.php';
function read_xls_file($filename){
$fileContent = [];
if ($xlsx = SimpleXLSX::parse($filename)) {
$fileContent = ($xlsx->rows());
} else {
echo SimpleXLSX::parseError();
}
return $fileContent;
}
function write_xlsxFile($filename, $data) {
function download_xlsxFile($data) {
$xlsx = SimpleXLSXGen::fromArray($data);
$xlsx->saveAs($filename);
$xlsx->downloadAs("data.xlsx");
}