摘要
介绍了基于C++和Python混合语言编程的WORD文档操作技术及其实现,针对C++开发的原系统对WORD文档操作不方便的问题,利用Python脚本灵活高效的特点,给出了一种在C++动态库中嵌入Python调用的方法。最后展示了一个项目中实现的WORD文档表格化输出接口以及相应的操作WORD文档的Python脚本,解决了实际项目中的困难。
Compared with other modern script languages, C++ language is not handy to operate Word document. In this article, a C++ and Python based hybrid programming method for Word document operation is introduced and implemented. Making use of Python' s agile and efficient feature, a method that embedding python in C++ dynamic link library is presented. The design measure and technique has been applied in real system.
出处
《信息化研究》
2014年第5期58-63,共6页
INFORMATIZATION RESEARCH