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

Cannot use object of type PHPExcel_RichText as array

Jul 29, 2016 am 08:51 AM
gt

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.

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

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What are the differences between Huawei GT3 Pro and GT4? What are the differences between Huawei GT3 Pro and GT4? Dec 29, 2023 pm 02:27 PM

What are the differences between Huawei GT3 Pro and GT4?

Fix: Snipping tool not working in Windows 11 Fix: Snipping tool not working in Windows 11 Aug 24, 2023 am 09:48 AM

Fix: Snipping tool not working in Windows 11

How to Fix Can't Connect to App Store Error on iPhone How to Fix Can't Connect to App Store Error on iPhone Jul 29, 2023 am 08:22 AM

How to Fix Can't Connect to App Store Error on iPhone

php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决 php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决 Jun 13, 2016 am 10:23 AM

php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决

Is watch4pro better or gt? Is watch4pro better or gt? Sep 26, 2023 pm 02:45 PM

Is watch4pro better or gt?

How to optimize iPad battery life with iPadOS 17.4 How to optimize iPad battery life with iPadOS 17.4 Mar 21, 2024 pm 10:31 PM

How to optimize iPad battery life with iPadOS 17.4

Guan Zeyuanjiang Shuying experiences Huawei MateBook GT 14: the perfect combination of technology and art Guan Zeyuanjiang Shuying experiences Huawei MateBook GT 14: the perfect combination of technology and art Aug 10, 2024 pm 09:51 PM

Guan Zeyuanjiang Shuying experiences Huawei MateBook GT 14: the perfect combination of technology and art

请教怎么修改url某一参数的参数值呢?是要拆开了再拼回去吗 请教怎么修改url某一参数的参数值呢?是要拆开了再拼回去吗 Jun 13, 2016 am 10:24 AM

请教怎么修改url某一参数的参数值呢?是要拆开了再拼回去吗

See all articles