不能包含电子表格Excel Writer

时间:2021-10-27 07:17:21

I have a problem with Pear package Spreadsheet Excel Writer. I want to generate excle file from php and found this package on internet.

我有一个关于Pear包电子表格Excel Writer的问题。我想从php生成excle文件,并在internet上找到这个包。

I copied smaple code from official page, but it doesn't work. Of course I have the pear installed on my server(Deb7, apache2, php5). I try to find where the app is not work and found that it doesn't include a file.

我从官方页面复制了smaple代码,但它不起作用。当然,我的服务器上安装了pear (Deb7、apache2、php5)。我试着找到应用程序不工作的地方,发现它不包含文件。

include_once 'Spreadsheet/Excel/Writer.php'

I installed the package by the command:

我通过命令安装了这个包:

pear install -f OLE
pear install -f Spreadsheet_Excel_Writer

I don't have any idea why that package doesn't include. I try including other packages and it forks fine. I inspected files in that package and recognized that Spreadsheet/Excel/Writer/Worksheet.php may cause the problem(I included each file in package and only this can't get included).

我不知道为什么那个包裹不包括在内。我试着把其他的包也包括进去,这样就可以分叉了。我检查了那个包中的文件,确认了那个电子表格/Excel/Writer/工作表。php可能会导致这个问题(我在包中包含了每个文件,只有这个不能包含)。

Please help me, maybe you now other way to generate excel from php.

请帮助我,也许你现在可以用别的方法从php生成excel。

1 个解决方案

#1


1  

You need to setup your include path correctly before you can use the pear-installed files.

在使用pearinstall文件之前,您需要正确地设置包含路径。

Follow the instructions in http://pear.php.net/manual/en/installation.checking.php

遵循http://pear.php.net/manual/en/install.checking.php中的说明

Don't forget to restart the web server after modifying php.ini.

在修改php.ini之后,不要忘记重新启动web服务器。

#1


1  

You need to setup your include path correctly before you can use the pear-installed files.

在使用pearinstall文件之前,您需要正确地设置包含路径。

Follow the instructions in http://pear.php.net/manual/en/installation.checking.php

遵循http://pear.php.net/manual/en/install.checking.php中的说明

Don't forget to restart the web server after modifying php.ini.

在修改php.ini之后,不要忘记重新启动web服务器。