my complicated problem in reading data.

Topics: Developer Forum, Project Management Forum, User Forum
Sep 28, 2011 at 10:16 PM

hi every body special tnx to all those publishing phpexcel

 

ihave a problem that is i reading data with this piece of code ..

==================

<?php
echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
require_once 'PHPExcel/IOFactory.php';
$objPHPExcel = PHPExcel_IOFactory::load("mm.xlsx");
    foreach ($objPHPExcel->getWorksheetIterator() as $worksheet) {
        $worksheetTitle     = $worksheet->getTitle();
    $highestRow         = $worksheet->getHighestRow();
    $highestColumn      = $worksheet->getHighestColumn();
    $highestColumnIndex = PHPExcel_Cell::columnIndexFromString($highestColumn);
    $nrColumns = ord($highestColumn) - 64;
    for ($row = 0; $row <= $highestRow; ++ $row) {
            for ($col = 0; $col < $highestColumnIndex; ++ $col) {
                $cell = $worksheet->getCellByColumnAndRow($col, $row);
                $val = $cell->getValue();
print ($val);               
                }
        }
    }
?>

=============

 

this code works well in my site >> http://ict-camp.net/hn/xlsx/see.php

but in other server not work .. >> http://www.ehsan-edu.org/temp_p/project/read.php

i installed all of thing that need for work like php_xml and php_zip or ..

 

i fully confused who can help me .?