How to remove the vision of the file structure

Topics: Developer Forum
Dec 30, 2012 at 10:58 AM

Hello,

when I run this code

 <?php
require_once './Classes/PHPExcel/IOFactory.php';
Excel$objPHPExcel = PHPExcel_IOFactory::load("rapportsimple.xls");
$sheet*/$sheet = $objPHPExcel->getSheet(0);
echo '

';
foreach($sheet->getRowIterator() as $row) {  
echo ' ';  
foreach ($row->getCellIterator() as $cell) {     
echo ' ';   }    
echo ' ';}
echo '
';     
print_r($cell->getValue());     
echo '
';?>

I see this :

DOM ELEMENT: HTML
ATTRIBUTE: xmlns => http://www.w3.org/1999/xhtml
DOM ELEMENT: HEAD
DOM ELEMENT: META
ATTRIBUTE: http-equiv => Content-Type
ATTRIBUTE: content => text/html; charset=utf-8
DOM ELEMENT: BODY

Only after, i see the table

How do I not see this structure?

Thanks

 

 

 

 

 

 

Coordinator
Dec 31, 2012 at 9:44 AM

Probably because your rapportsimple.xls file has an extension of .xls but is actually an html file instead.... open it in a text editor and see

Dec 31, 2012 at 12:05 PM

Yes it's a html file :(

thank you for your response