rajwebsoft / xlsreader
Read the content from the xls file in object and array
1.0.1
2023-07-18 15:47 UTC
This package is auto-updated.
Last update: 2024-12-18 19:09:44 UTC
README
Read the Xlsx file in laravel easy with the array object
composer require rajwebsoft/xlsreader
Add the code in config/app.php
'providers' => [
....
Rajwebsoft\Xlsreader\XlsreaderServiceProvider::class,
]
Use in controller
use Rajwebsoft\Xlsreader\Xlsreader;
$objdata =new Xlsreader();
$xlsobj = $objdata->readFile("itf_example.xlxs");
$sheetNames = $xlsobj->getSheetNames();
$sheetdata=$xlsobj->getSheetData($sheetNames[1]);
$requestcontact = $xlsobj->getDataObject($sheetdata);
Output
[{
"name"=>"raj Kumar",
"phone"=>"9090909090",
},
{
"name"=>"rahul Kumar",
"phone"=>"8787878788",
}]
Now you can enjoy the package and your suggetion is welcome for any issue