PHP 基础:PHPEXCEL 使用说明
下面的主要为大家介绍基于 PHPEXCEL 实现的,供大家参考下
首先是使用 PHP Reader 读取 Excle
内容:
复制代码 代码如下:
require
("");
$file
= "D:\\datas.xlsx";
if
(!
file_exists
(
$file
)){
die
("no file found in {$file}");
}
$datasReader
= PHPExcel_IOFactory::load(
$file
);
$sheets
=
$datasReader
->getAllSheets();
//
如果有多个工作簿
$countSheets
=
count
(
$sheets
);
$sheetsinfo
=
array
();
$sheetData
=
array
();
if
(
$countSheets
==1){