Reading .docx in C++

时间秒杀一切 提交于 2019-12-01 06:50:34
Peter Olsson

The easiest way is to use Word to do this. It has limitations on licensing.

The SO question Creating, opening and printing a word file from C++ has some good references.

Edit:

According to these questions/answers can unzip the Open XML file and process the XML file directly:

If you use .NET there are more (C#) questions to read:

If you want to stay on the open-source world, OpenOffice 3 should be able to process .docx files. There is a project to implement an API for many languages, I don't really know how complete or complex it is.

There is a script in PHP that can convert from .docx into plain text. That is, if you are not scared that all docs are in russian). That could be another option (triggering the php script with a system call and parsing the results from a file)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!