在Linux下自动运行Excel宏 [英] Running Excel Macros Automatically under Linux

查看:695
本文介绍了在Linux下自动运行Excel宏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的一部分软件使用Excel工作表来存储用户错误消息&他们的翻译。我们运行一个宏,它产生一组国际化的文本文件&匹配的头文件,然后复制到我们的版本控制系统(电子表格也在版本控制),并作为我们的构建的一部分。



我想自动化我们的构建更好,拉xls,运行宏,然后在编译源之前将文件复制到正确的位置。我的构建框都是基于Linux的。



我尝试在OpenOffice.org中加载XLS并运行宏,但这似乎不起作用。 >

是否有任何选项,或者我是SOL,直到我们可以说服利益相关者,我们需要使用Excel之外的格式来存储这些数据?

解决方案

这不是用于存储提供问题的数据的格式。这是用于存储逻辑的格式。存储在Excel中的数据可以在Linux上访问。嵌入Excel宏的逻辑不是。



这些宏有多复杂?任何可以用另一种形式再现它们的机会(Perl?)。在这种情况下,您可以通过编程方式从.XLS中提取数据,逻辑可以在任何地方运行Perl引擎。


Part of the software I work on uses an Excel sheet to store the user error messages & their translations. We run a macro which generates a set of internationalized text files & matching header files that are then copied into our version control system (the spreadsheet is also in Version Control) and used as part of our build.

I'd like to automate our build better, pulling the xls, running the macro, then copying the files to the correct location before compiling our source. Our build boxes are all Linux based.

I've tried loading the XLS in OpenOffice.org and running the macro, but that does not appear to work.

Is there any option, or am I SOL until we can convince the stakeholders that we need to use a format other than Excel to store this data?

解决方案

It's not the format you use to store the data that is giving you problems. It's the format you use to store the logic. Data stored in Excel is accessible on Linux. Logic embedded in Excel macros is not.

How complicated are those macros? Any chance you could reproduce them in another form (Perl?). In that case you could programmatically extract the data from the .XLS, and the logic can run anywhere there is a Perl engine.

这篇关于在Linux下自动运行Excel宏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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