如何避免丢失PHPExcel中的宏? [英] How to avoid losing macros in PHPExcel?

查看:60
本文介绍了如何避免丢失PHPExcel中的宏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用PHPExcel从数据库中读取数据并将其放入电子表格中.我也有一个模板(.xlsm文件)要遵循.众所周知,PHPExcel不支持宏.但是我不想编辑或创建宏.我只想确保它们留在原处.甚至不想触摸它们.

I'm using PHPExcel to read data from a database and put it into a spreadsheet. I also have a template (.xlsm file) to be followed. As everybody knows, PHPExcel doesn't support macros. But I don't want to edit or create the macros. I just wanna make sure they remain where they are. Don't even want to touch them.

那么,有人知道为此有什么解决方法吗?

So, does anybody know any workaround for that?

我已经为此工作了一个星期.我已经阅读了 this .第一个解决方案的问题是我的服务器是Debian,所以我无法尝试使用Libxl方法.

I've been working on this for a week now. I already read this and this. The problem with the first solution is that my server is a Debian so I can't try Libxl approch.

在Codeplex中,我对Chads2000的评论发现了以下解决方案,但我似乎没有使其能够正常工作.我很绝望.

In codeplex I've found the following solution on Chads2000's comment, but I aint seem to be able to make it work. I'm desperate.

感谢您的关注.

推荐答案

好吧,我在很久以前就知道了这一点:

Well, I figured this out quite a long time ago: here's the answer. A guy made a workaround. First, he separate the macros files (VBA) from the sheet, then he left the PHPExcel "doing his thing", e then put it back (the macros!). It was enough for me! :D

这篇关于如何避免丢失PHPExcel中的宏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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