是否可以使用PHPExcel编辑现有模板文件,并维护现有格式/电子表格对象 [英] Is it possible to use PHPExcel to edit an existing template file, and maintain existing formatting / spreadsheet objects

查看:212
本文介绍了是否可以使用PHPExcel编辑现有模板文件,并维护现有格式/电子表格对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种从MySQL数据操作/生成xls/xlsx文件的服务器端(PHP)方法.

I'm looking for a server-side (PHP) way of manipulating / producing xls / xlsx files from MySQL data.

我有一个现有的模板xls文件,其中包含各种相对复杂的与单元格相关的公式和图表等,我希望我可以将该模板文件上传到我的服务器上,并使用PHPExcel编辑该文件并保存:要下载.

I have an existing template xls file, with various relatively complicated cell dependant formulas and charts and such included, my hope is that I can upload this template file to my server and use PHPExcel to edit that file, and save it: allowing it to be downloaded.

因此保留了我的公式,保留了图表,而我只需要根据数据库中的值编辑某些单元格的数据->根据这些值绘制的图表即可.

So my formulas are kept, the charts are kept, and I simply have to edit the data for certain cells based on values from the database --> charts drawn based on these values.

PHPExcels内的事情是这样吗?

Is that kind of thing within PHPExcels remit?

在此处阅读相关问题: PHPExcel修改具有多个工作表的现有.xlsx文件

Reading a related question here: PHPExcel modify existing .xlsx file with multiple worksheet

有人说:

PHPExcel不支持宏和用户定义的函数;和 库在被删除时会丢弃工作簿的所有不受支持的功能 已加载,因此它们根本不存在于PHPExcel对象中……当 保存,PHPExcel仅保存工作簿中存在的那些元素 在PHPExcel对象中.

Macros and User-Defined Functions are not supported in PHPExcel; and the library discards any unsupported features of a workbook when it is loaded, so they don't exist in the PHPExcel object at all... when saving, PHPExcel only saves those elements of the workbook that exist in the PHPExcel object.

用户定义的函数是否包括简单的单元格公式?

Would a user defined function include simple cell formulas?

谢谢!

推荐答案

.简单的单元格公式仍将存在.只是没有任何VBA代码.

No. Simple cell formulas will still be there. Just not any VBA code.

这篇关于是否可以使用PHPExcel编辑现有模板文件,并维护现有格式/电子表格对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆