Skip to content

Instantly share code, notes, and snippets.

@ahgood
Created August 25, 2016 03:38
Show Gist options
  • Save ahgood/4ed6b569517709be541fa6c2d265b789 to your computer and use it in GitHub Desktop.
Save ahgood/4ed6b569517709be541fa6c2d265b789 to your computer and use it in GitHub Desktop.
Read XLS by PHP
<?php
// Download PHPExcel from: https://github.com/PHPOffice/PHPExcel before run this code
include 'PHPExcel-1.8/Classes/PHPExcel/IOFactory.php';
$inputFileName = './Book1.xls';
$objPHPExcel = PHPExcel_IOFactory::load($inputFileName);
$sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true);
var_dump($sheetData);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment