PHP头条
热点:

使用phpExcelreader有关问题


使用phpExcelreader问题
在使用中读取文件时 出现sheets中没有数据,但是
boundsheets Array [3]
formatRecords Array [15]
sst Array [263]
中有数据。 这个是为什么呢



------解决方案--------------------
这个问题不好说
PHP code

require_once 'Excel/reader.php';

  $data = new Spreadsheet_Excel_Reader();

  $data->setOutputEncoding('gbk');

  $data->read(test.xls');

  for ($i = 1; $i <= $data->sheets[0]['numRows']; $i++) 

  {

        for ($j = 1; $j <= $data->sheets[0]['numCols']; $j++) 

        {

            echo $data->sheets[0]['cells'][$i][$j];

        }

    }

------解决方案--------------------
改一下单元格的格式,如文本格式

www.phpzy.comtrue/phprm/47214.htmlTechArticle使用phpExcelreader有关问题 使用phpExcelreader问题 在使用中读取文件时 出现sheets中没有数据,但是 boundsheetsArray [3] formatRecordsArray [15] sstArray [263] 中有数据。 这个是为什么呢 ------解决方案...

相关文章

PHP之友评论

今天推荐