Home > Backend Development > PHP Tutorial > Cannot use object of type PHPExcel_RichText as array

Cannot use object of type PHPExcel_RichText as array

WBOY
Release: 2016-07-29 08:51:07
Original
1638 people have browsed it

First explain the meaning of the title: Rich text objects cannot be converted into arrays

Generally this problem will occur when we transfer Excel. The reason for the problem is that there are rich text objects in the Excel table.

Solution 1:
$student['actual_residence']=(string)$objPHPExcel->getActiveSheet()->getCell("M".$i)->getValue();
Principle: Convert rich text objects to string type.


Solution 2:
In fact, there is already a conversion method written in PHPExcel, you can just call it directly.
$objPHPExcel->getActiveSheet()->getCell("M".$i)->getValue()->__toString();

').addClass('pre-numbering') .hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above has introduced Cannot use object of type PHPExcel_RichText as array, including the relevant aspects. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
gt
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template