Reading .docx in C++

前端 未结 2 1322
别那么骄傲
别那么骄傲 2020-12-19 16:15

I\'m trying to create a program that reads a .docx file and posts it content to a blog/forum for personal use. I finally have figured out how to use libcurl to do (what I f

2条回答
  •  醉酒成梦
    2020-12-19 16:34

    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:

    • How can I read a Word 2007 .docx file?

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

    • How to grab text from word (docx) document in C#?
    • How to load MS Word document in C# (.NET)?
    • How can I programatically use C# to append multiple DOCX files together?

提交回复
热议问题