PHPEXCEL如何使用,
程序员文章站
2022-05-24 13:35:50
...
PHPEXCEL怎么使用,急
网上下了个PHPEXCEL1.8.0,根据安装包里的install.txt文件,好像是把Classes和Examples两个目录考贝到WEB根目录就可以用,不知道是不是我翻译的不对,网上找了段生成EXL的代码执行后报错:syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /www/webroot/php/test/Classes/PHPExcel.php on line 50,我程序路径:/www/webroot/php/test/test.php
以下是test.php全部内容
include 'Classes/PHPExcel.php';
include 'Classes/PHPExcel/Writer/Excel2007.php';
#创建一个excel
$objPHPExcel = new PHPExcel();
#保存excel—2007格式
$objWriter = new PHPExcel_Writer_Excel2007($objPHPExcel);
$objWriter->save("xxx.xlsx");
?>
install.txt文件安装说明如下:
Installation instructions
-------------------------
Installation is quite easy: copy the contents of the Classes folder to any location
in your application required.
Example:
If your web root folder is /var/www/ you may want to create a subfolder called
/var/www/Classes/ and copy the files into that folder so you end up with files:
/var/www/Classes/PHPExcel.php
/var/www/Classes/PHPExcel/Calculation.php
/var/www/Classes/PHPExcel/Cell.php
...
Getting started
---------------
A good way to get started is to run some of the tests included in the download.
Copy the "Examples" folder next to your "Classes" folder from above so you end up with:
/var/www/Examples/01simple.php
/var/www/Examples/02types.php
...
Start running the test by pointing your browser to the test scripts:
http://example.com/Examples/01simple.php
http://example.com/Examples/02types.php
...
Note: It may be necessary to modify the include/require statements at the beginning of
each of the test scripts if your "Classes" folder from above is named differently.
"install.txt" 75L, 2671C
------解决方案--------------------
PHPExcel是最新版本吗
试试他这个 http://www.9958.pw/post/php_excel
------解决方案--------------------
下的是第几个?
你的代码并无问题
网上下了个PHPEXCEL1.8.0,根据安装包里的install.txt文件,好像是把Classes和Examples两个目录考贝到WEB根目录就可以用,不知道是不是我翻译的不对,网上找了段生成EXL的代码执行后报错:syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /www/webroot/php/test/Classes/PHPExcel.php on line 50,我程序路径:/www/webroot/php/test/test.php
以下是test.php全部内容
include 'Classes/PHPExcel.php';
include 'Classes/PHPExcel/Writer/Excel2007.php';
#创建一个excel
$objPHPExcel = new PHPExcel();
#保存excel—2007格式
$objWriter = new PHPExcel_Writer_Excel2007($objPHPExcel);
$objWriter->save("xxx.xlsx");
?>
install.txt文件安装说明如下:
Installation instructions
-------------------------
Installation is quite easy: copy the contents of the Classes folder to any location
in your application required.
Example:
If your web root folder is /var/www/ you may want to create a subfolder called
/var/www/Classes/ and copy the files into that folder so you end up with files:
/var/www/Classes/PHPExcel.php
/var/www/Classes/PHPExcel/Calculation.php
/var/www/Classes/PHPExcel/Cell.php
...
Getting started
---------------
A good way to get started is to run some of the tests included in the download.
Copy the "Examples" folder next to your "Classes" folder from above so you end up with:
/var/www/Examples/01simple.php
/var/www/Examples/02types.php
...
Start running the test by pointing your browser to the test scripts:
http://example.com/Examples/01simple.php
http://example.com/Examples/02types.php
...
Note: It may be necessary to modify the include/require statements at the beginning of
each of the test scripts if your "Classes" folder from above is named differently.
"install.txt" 75L, 2671C
------解决方案--------------------
PHPExcel是最新版本吗
试试他这个 http://www.9958.pw/post/php_excel
------解决方案--------------------
下的是第几个?
你的代码并无问题
相关文章
相关视频
推荐阅读
-
灵活掌握asp.net中gridview控件的多种使用方法(下)
-
详解 Android中Libgdx使用ShapeRenderer自定义Actor解决无法接收到Touch事件的问题
-
Android 中 onSaveInstanceState()使用方法详解
-
使用UITextField限制只可输入中,英文,数字的方法
-
好用的Python编辑器WingIDE的使用经验总结
-
Android RecycleView使用(CheckBox全选、反选、单选)
-
Java中使用LocalDate根据日期来计算年龄的实现方法
-
Android 中ViewPager中使用WebView的注意事项
-
解析使用C# lock同时访问共享数据
-
C#使用GDI+创建缩略图实例