ismail0234/fast-excel-reader

A very fast excel reader written in php.

v1.0.4 2023-09-05 13:42 UTC

This package is auto-updated.

Last update: 2024-11-05 15:57:32 UTC


README

Latest Stable Version Total Downloads License

A very fast excel reader written in php.

Composer Install

composer require ismail0234/fast-excel-reader

Benchmark

Install & Usage

use FastExcel\FastExcelReader;

include "vendor/autoload.php";

$excel = new FastExcelReader();
$excel->SetPath('/home/mywebsite/public_html/myexcel.xlsx');
$excel->SetTmp('/home/mywebsite/public_html/tmp/');

if ($excel->Open())
{
	foreach ($excel->GetRows() as $row) 
	{
		// Row Details
		echo '<pre>';
		print_r($row);
		echo '</pre>';
		exit;

		// Output
		/*
			Array
			(
			    [RowId] => 10001
			    [Cells] => Array
			        (
			            [0]  => Cell Value 0
			            [1]  => Cell Value 1
			            [2]  => Cell Value 2
			            [3]  => Cell Value 3
			            [5]  => Cell Value 5
			            [6]  => Cell Value 6
			            [7]  => Cell Value 7
			            [8]  => Cell Value 8
			            [9]  => Cell Value 9
			            [10] => Cell Value 10
			            [11] => Cell Value 11
			            [12] => Cell Value 12
			            [13] => Cell Value 13
			            [14] => Cell Value 14
			            [15] => Cell Value 15
			            [16] => Cell Value 16
			            [17] => Cell Value 17
			            [18] => Cell Value 18
			            [21] => Cell Value 21
			        )
			)
		*/
	}
}