PHPOffice / PHPExcel

ARCHIVED
Other
11.46k stars 4.2k forks source link

Pls help! Code is simply not working (Problem with: ->) #1343

Open 123tio opened 6 years ago

123tio commented 6 years ago

Hello Friends,

pls help me with this issue. I tried so many times...

I donwloaded code examples and tried to open a XLS for reading. Every time i open the php file in my browser it simply shows me the code afte the "->". Here is my code so far:

` <!DOCTYPE HTML>

load($inputFileName); $data = array(1,$objPHPExcel->getActiveSheet()->toArray(null,true,true,true)); //print the result echo '
';
    print_r($data);
echo '
'; //another option to display the data //go over the result and parse the records, then make it more readable if($data[0]==1){ foreach($data[1] AS $row){ foreach($row AS $column){ echo $column . ', '; } echo '
'; } } ?> ` Pls give me a hint for this obvisouly simle problem. THx in advance. Tio