PHP and MS Excel

There are several libraries out there for reading and writing MS Excel files. Here I note down my experiences with some of them.

Here is a list of libraries for working with Excel:

 

maatwebsite/excel

Link: https://packagist.org/packages/maatwebsite/excel

Reading a worksheets first column:

Be sure to configure the Package to import the headings as numeric:

Here is my sample code:

 

php-excel-reader/spreadsheet-reader

Link: https://packagist.org/packages/php-excel-reader/spreadsheet-reader

Reading a worksheets first column:

 

Export as HTML to Excel

Last but not least there is the HTML output. Here I found a nice article about: http://jwcooney.com/2011/09/08/generating-excel-documents-through-html-xml-and-css-part-2/

PHP Header

Example HTML Table