Home > Backend Development > PHP Tutorial > phpexcel 导入日期时间的问题

phpexcel 导入日期时间的问题

WBOY
Release: 2016-06-06 20:35:29
Original
2359 people have browsed it

<code>import("Org.Util.PHPExcel");
$PHPExcel=new \PHPExcel();
vendor('PHPExcel.PHPExcel.IOFactory');
dump($data);
echo PHPExcel_Shared_Date::ExcelToPHP($data['2'][A]);
</code>
Copy after login
Copy after login

为什么使用了还是
Class 'Home\Controller\PHPExcel_Shared_Date' not found

回复内容:

<code>import("Org.Util.PHPExcel");
$PHPExcel=new \PHPExcel();
vendor('PHPExcel.PHPExcel.IOFactory');
dump($data);
echo PHPExcel_Shared_Date::ExcelToPHP($data['2'][A]);
</code>
Copy after login
Copy after login

为什么使用了还是
Class 'Home\Controller\PHPExcel_Shared_Date' not found

看你的错误:Class 'Home\Controller\PHPExcel_Shared_Date' not found

此命名空间Home\Controller\下有没有这个类呢?

你上面有用 \PHPExcel();那么这个类PHPExcel_Shared_Date你也应该加上相应的命名空间来作限定;

Related labels:
php
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