用 C++ 读取 .docx [英] Reading .docx in C++

查看:46
本文介绍了用 C++ 读取 .docx的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个读取 .docx 文件并将其内容发布到博客/论坛供个人使用的程序.我终于想出了如何使用 libcurl 来做(我认为)是程序中最难的部分.现在我只需要阅读 .docx 文件,但遇到了麻烦.我似乎找不到有关如何执行此操作的任何文档.有什么想法吗?

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 figured) was the harder part of the program. Now I just have to read the .docx file, but have come under a snag. I can't seem to find any documentation on how to do this. Any ideas?

推荐答案

最简单的方法是使用 Word 来执行此操作.它对许可有限制.

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

SO 问题 创建、打开和打印 word 文件来自 C++ 有一些很好的参考.

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

根据这些问题/答案可以解压Open XML文件并直接处理XML文件:

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

如果您使用 .NET,还有更多 (C#) 问题需要阅读:

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

这篇关于用 C++ 读取 .docx的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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