2017 © Pedro Peláez
 

library excelheader

Get ExcelHeader in Json Format By file path and Row number For First Sheet of file

image

mahavirvataliya/excelheader

Get ExcelHeader in Json Format By file path and Row number For First Sheet of file

  • Wednesday, March 14, 2018
  • by mahavirvataliya
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

excelheader

For getting ExcelHeader# mahavirvataliya/excelheader Welcome to the excelheader wiki! If U want to Use This Package in your Project Then Use, (*1)

composer require mahavirvataliya/excelheader, (*2)


There are Two methods, (*3)

getExcelHeader($filepath,$rowno=1), (*4)

It will return json object of header of first sheet given as file path and if you give row no of header then it will return that row, (*5)

getAllSheetExcelHeader($filepath,$rowno=1), (*6)

get all headers means get header from all sheet given by row number as same to all mean return that row as json object, (*7)

I Have Used https://github.com/PHPOffice/phpspreadsheet as read excel files please go for it if you want to develop go for it., (*8)

Add at Import Section, (*9)

use mahavirvataliya\ExcelHeader\ExcelHeader;, (*10)

use it where you want to, (*11)

For Example For Uploading Excel file And getting headers or any row we use like this where xls is name parameter in file upload, (*12)

public function upload(Request $request)
{
    $request->xls;
    if($request->hasFile('xls')) {

        $file = $request->file('xls') ;

        $fileName = $file->getClientOriginalName() ;
        $destinationPath = public_path() ;
        $file->move($destinationPath,$fileName);

        $rownno = $request->rowno==null?1:$request->rowno;
        $rows =  ExcelHeader::getExcelHeader(public_path().'/'.$fileName,$rownno);
        return view('excelfile',compact('rows'));
    }
    else
    {
        $rows=[];
        return view('excelfile',compact('rows'));
    }
}

The Versions

14/03 2018

dev-master

9999999-dev https://github.com/mahavirvataliya

Get ExcelHeader in Json Format By file path and Row number For First Sheet of file

  Sources   Download

LGPL-2.1-or-later

The Requires

  • php ^5.6|^7.0
  • ext-ctype *
  • ext-dom *
  • ext-gd *
  • ext-iconv *
  • ext-libxml *
  • ext-mbstring *
  • ext-simplexml *
  • ext-xml *
  • ext-xmlreader *
  • ext-xmlwriter *
  • ext-zip *
  • ext-zlib *
  • psr/simple-cache ^1.0

 

The Development Requires

php excel xls spreadsheet xlsx openxml ods gnumeric

14/03 2018

1.0.1

1.0.1.0 https://github.com/mahavirvataliya

Get ExcelHeader in Json Format By file path and Row number For First Sheet of file

  Sources   Download

LGPL-2.1-or-later

The Requires

  • php ^5.6|^7.0
  • ext-ctype *
  • ext-dom *
  • ext-gd *
  • ext-iconv *
  • ext-libxml *
  • ext-mbstring *
  • ext-simplexml *
  • ext-xml *
  • ext-xmlreader *
  • ext-xmlwriter *
  • ext-zip *
  • ext-zlib *
  • psr/simple-cache ^1.0

 

The Development Requires

php excel xls spreadsheet xlsx openxml ods gnumeric

13/03 2018

1.0

1.0.0.0 https://github.com/mahavirvataliya

Get ExcelHeader in Json Format By file path and Row number For First Sheet of file

  Sources   Download

LGPL-2.1-or-later

The Requires

  • php ^5.6|^7.0
  • ext-ctype *
  • ext-dom *
  • ext-gd *
  • ext-iconv *
  • ext-libxml *
  • ext-mbstring *
  • ext-simplexml *
  • ext-xml *
  • ext-xmlreader *
  • ext-xmlwriter *
  • ext-zip *
  • ext-zlib *
  • psr/simple-cache ^1.0

 

The Development Requires

php excel xls spreadsheet xlsx openxml ods gnumeric