c++读取包含数据和图表的Excel文件
我正在使用 C++ 编写一个程序来读取 Excel 文件。我只需要文件的两列,而 Excel 文件只是不包含字段...它还包含图表。有 10 列,我需要的两列是第一列和第七列。转换成 CSV 不起作用。任何建议请。
谢谢。
I am writing a program to read a excel file using c++. i need only the two columns of the file and the excel file just dont contain fields...it also contains graphs. there are 10 columns and the two columns i need are the first and 7th. converting into CSV didnt work. Any suggestions plz.
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要将文件另存为 CSV,然后使用 fopen 读入 CSV 文件。您还需要开始自己做作业,而不是向互联网上的人寻求帮助。
You need to save the file as CSV and then read in the CSV file using fopen. You also need to start doing your homework on your own and not asking people on the internet for help.
Excel 可以通过其 COM 接口以编程方式驱动。下面是一些代码:
该代码获取从光盘加载的电子表格中单元格 A1 中的值。您应该能够从这里开始读取两列数据。
Excel can be driven programatically through its COM interface. Here is some code:
This code gets the value in cell A1 in a spreadsheet loaded from disc. You should be able to go from here to reading your two columns of data.