Problem for displaying examples

Topics: User Forum
Jun 4, 2012 at 9:26 AM

Hello everybody !

I've just installed PHPExcel 1.7.7 and I realise that even the examples don't work !

For instance, when I access to this URL : [MY_WEBSITE]/Documentation/Examples/Reader/exampleReader01.php

What I see is http://uppix.net/2/1/c/16d5a88de8f032d3c8bcaf5fb0253.png

When analysing the PHP code, I see that this array is created by 

$sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true);

var_dump($sheetData);

My PHP Version is 5.2.17

Any help will be highly appreciated :)

Coordinator
Jun 4, 2012 at 10:36 AM
Edited Jun 4, 2012 at 10:36 AM

What do you actually expect to see?

The examples demonstrate reading example files, and then displaying the data from those example files as an array of cell data using var_dump() to show that they have been successfully read.

This is doing exactly what it's supposed to do... and the data dump shown in the image that you've uploaded is the var_dump() of that data. So in what way doesn't it work?

Jun 4, 2012 at 10:52 AM

Thank you for your quick reply Mark.

I thought that PHPExcel would be something close to php-excel-reader ( http://code.google.com/p/php-excel-reader/downloads/list )

But it seems that PHPExcel is a tool providing functions, without providing an html interface for reading and modifying excel files online. Am I right ?

Coordinator
Jun 4, 2012 at 11:01 AM

As far as I'm aware, php-excel-reader does nothing more than PHPExcel's Excel5 and HTML Writer combined.

We don't provide a GUI for modifying Excel files, just a library that is a toolset of functions for reading, manipulating and writing.

The example Reader code is demonstrating exactly that PHPExcel can read an excel file, it isn't demonstrating output capabilities of any kind. The PHPExcel readers load the file into a PHPExcel object where it can then be manipulated as necessary. Subsequently, you can use one of PHPExcel's writers (such as the HTML writer) to render that PHPExcel object in an appropriate format and save to file or send to php://output