如何在C ++中将数据写入Excel文件 [英] How to write data into an Excel file in C++

查看:518
本文介绍了如何在C ++中将数据写入Excel文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Microsoft Visual Studio 2012 C ++进行编程. 我的教授要求我将程序的结果放入一个excel文件而不是文本文件中.因为其他人更容易理解. 我可以在C ++程序中使用一些接口来直接生成一个excel文件并将数据放入其中吗?

I am programming with Microsoft Visual studio 2012 C++. My professor asks me to put the result of my program into an excel file instead of a text file. Because it is easier for others to understand. Is there some interface I can use in my C++ program to directly generate an excel file and put the data in it?

推荐答案

如果您不想使用第三方库或自动化工具,并且需要某种格式(颜色,字体等),则可以可以简单地创建一个开放式办公室xml. http://en.wikipedia.org/wiki/Microsoft_Office_2003_XML_formats

If you don't want to use a third party library or automation, and you need some kind of formatting (colors, fonts, etc...) you can simply create a open office xml. http://en.wikipedia.org/wiki/Microsoft_Office_2003_XML_formats

这篇关于如何在C ++中将数据写入Excel文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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