Simple Read XLSX and CSV file in PHP

 here is the code and the library file is attached below.

Library File is here:- Download from here

https://drive.google.com/file/d/1fNXtQQbmnII5P7_CZ4EUulaazoPfuz-b/view

To Read CSV: 

$FileURL = 'testfile.xlsx';

require_once "lib/parsecsv.lib.php";

$csv = new parseCSV($FileURL);

echo "test<pre>";

print_r($csv->data);

To Read XLSX: 

$FileURL = 'testfile.xlsx';

require_once "lib/SimpleXLSX.php"

$xlsx = SimpleXLSX::parse($FileURL);

echo "test<pre>";

print_r($xlsx->rows());

Popular posts from this blog

Cant use dump() function in twig files or how to enable debug in opencart twig or print_r alternate use dump() in opencart 3.0

maximum execution time error when importing sql data file since php.ini has been already set max execution time 3000

SEO Custom URL in Opencart