OS Excel Bundle for Symfony2

2.1 2013-04-03 22:25 UTC


Add this line to the require option in your composer.json file:

 "os/excel-bundle": "dev-master"

Execute this command line

 php composer.phar update os/excel-bundle

In your app/AppKernel.php

 new OS\ExcelBundle\OSExcelBundle


Call service

 $excel = $this->get('os.excel');

Open file


Select sheet


Get count of sheet


Get sheet names


Get count of rows of selected sheet


Get Count of columns of selected sheet


Get index of last column


Get row data


Get cell data

 $excel->getCellData([INDEX_OF_ROW], [INDEX_OF_COLUMN]);

GET sheet data as php array