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.
').addClass('pre-numbering') .hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });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();
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.