PHPExcel Reader Example #01

Simple File Reader using PHPExcel_IOFactory::load()

Loading file example1.xlsx using IOFactory to identify the format

array(8) { [1]=> array(6) { ["A"]=> string(15) "Integer Numbers" ["B"]=> string(3) "123" ["C"]=> string(3) "234" ["D"]=> string(4) "-345" ["E"]=> string(3) "456" ["F"]=> NULL } [2]=> array(6) { ["A"]=> string(22) "Floating Point Numbers" ["B"]=> string(4) "1.23" ["C"]=> string(5) "23.45" ["D"]=> string(7) "3.45E-6" ["E"]=> string(6) "-45.68" ["F"]=> string(7) "£56.78" } [3]=> array(6) { ["A"]=> string(7) "Strings" ["B"]=> string(5) "Hallo" ["C"]=> string(8) "Allemaal" ["D"]=> NULL ["E"]=> string(8) "PHPExcel" ["F"]=> NULL } [4]=> array(6) { ["A"]=> string(8) "Booleans" ["B"]=> bool(true) ["C"]=> bool(false) ["D"]=> NULL ["E"]=> NULL ["F"]=> NULL } [5]=> array(6) { ["A"]=> string(5) "Dates" ["B"]=> string(16) "19 December 1960" ["C"]=> string(15) "10 October 2010" ["D"]=> NULL ["E"]=> NULL ["F"]=> NULL } [6]=> array(6) { ["A"]=> string(5) "Times" ["B"]=> string(4) "9:30" ["C"]=> string(5) "23:59" ["D"]=> NULL ["E"]=> NULL ["F"]=> NULL } [7]=> array(6) { ["A"]=> string(8) "Formulae" ["B"]=> string(3) "468" ["C"]=> string(7) "-20.998" ["D"]=> NULL ["E"]=> NULL ["F"]=> NULL } [8]=> array(6) { ["A"]=> string(6) "Errors" ["B"]=> string(4) "#N/A" ["C"]=> string(7) "#DIV/0!" ["D"]=> NULL ["E"]=> NULL ["F"]=> NULL } }

Cel lezen:
Hallo Allemaal

Rij lezen:
Array ( [A] => Floating Point Numbers [B] => 1.23 [C] => 23.45 [D] => 3.45E-6 [E] => -45.68 [F] => £56.78 )

Kolom lezen:
Array ( [1] => 234 [2] => 23.45 [3] => Allemaal [4] => [5] => 10 October 2010 [6] => 23:59 [7] => -20.998 [8] => #DIV/0! )