当前位置>主页 > 期刊在线 > 计算机技术 >

计算机技术2020年2期

基于Python 实现反向邮件合并功能
马孝宗,戚亚东,徐燕
(河南中烟工业有限责任公司驻马店卷烟厂 卷包部,河南 驻马店 463000)

摘  要:邮件合并是Office 的一项功能,可便捷地批量生成文档,却无法从大量Word 文档中汇总信息。结合实际应用,阐述基于Python 语言对Word 文档进行批量导入、读取其中的表格与段落、汇总信息至Excel 工作簿的实现过程。实现反向邮件合并功能,解决Word 文档批量汇总中的多个难点,实现Word 文档批量汇总的自动化,有效提高了用户的工作效率,适用于人事数据、财务数据、员工信息的汇总,具有良好的实用性与推广价值。


关键词:Python;邮件合并;批量汇总



中图分类号:TP391         文献标识码:A         文章编号:2096-4706(2020)02-0119-03


Reverse Mail Merge Based on Python

MA Xiaozong,QI Yadong,XU Yan

(Cigarette Rolling Department of Zhumadian Cigarette Factory of Henan Zhongyan Industry Co.,Ltd.,Zhumadian 463000,China)

Abstract:Mail merge is a feature of Office that makes it easy to produce documents in bulk,but doesn’t aggregate information from a large number of Word documents. Combined with practical application,this paper describes the implementation process of importing Word documents in batches based on Python language,reading the tables and paragraphs therein,and summarizing the information to the Excel workbook. Realize the function of reverse mail merge,solve many difficulties in the batch summary of Word documents,realize the automation of batch summary of Word documents,effectively improve the work efficiency of users,suitable for the summary of personnel data,financial data,employee information,with good practicability and promotion value.

Keywords:Python;mail merge;bulk summary


参考文献:

[1] 张良均,王路,谭立云,等.Python 数据分析与挖掘实战 [M]. 北京:机械工业出版社,2015:60-64.

[2] Kyxdpzy. 从Excel 到Python:数据分析进阶指南 [M/OL].(2019-04-27)http://www.doc88.com/p-7012538072968.html.

[3] MCKINNEY W. 利用Python 进行数据分析:第2 版 [M].徐敬一,译. 北京:机械工业出版社,2018:10-11.

[4] 恒盛杰资讯.Word/Excel/PPT2016 高效办公实战从入门到精通 [M]. 北京:机械工业出版社,2017:366-373.

[5] 杨阳.Word/Excel/PPT2016 办公应用从入门到精通 [M].天津:天津科学技术出版社,2017:570-574.

[6] 张志强,赵越. 零基础学Python [M]. 北京:机械工业出版社,2015:85-86.


作者简介:马孝宗(1989-),男,汉族,河南驻马店人,信息管理员,助理工程师,硕士学位,研究方向:数据分析、办公自动化、深度学习。