如何阅读从Excel US preadsheet数据? [英] How to read data from Excel spreadsheet?

查看:170
本文介绍了如何阅读从Excel US preadsheet数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在一个项目我工作的客户端已经在问我添加功能导入从Excel US preadsheet数据的最后一分钟。他送我的例子中有一个扩展的.xlsx所以我假设他们是从Excel 2010,但我想如果可能的话,以支持所有版本。是否有一个快速简便的方法来从C程序打开和阅读从Excel US preadsheet数据?

In a project I'm working the client has asked at the last minute that I add functionality to import data from an Excel spreadsheet. The examples he's sent me have an .xlsx extension so I'm assuming they are from Excel 2010, but I'd like to support all versions if possible. Is there a quick and easy way to open and read data from an Excel spreadsheet from a C program?

我能想到的唯一的想法是连接到S preadsheet就好像它是一个数据库,然后我从它需要的信息。这是一个很好的方法吗?我如何通过C共同连接到Excel US preadsheet?我想尽可能多的使用Windows API越好。

The only idea I can think of is to connect to the spreadsheet as if it were a database and SELECT the information I need from it. Is this a good approach? How do I connect to an Excel spreadsheet through C? I'd like to use the Windows API as much as possible.

推荐答案

您可以使用OLE自动化功能来启动Excel,让它读档4颗你。

You can use the OLE Automation feature to start Excel and let it read the file four you.

见的例子在这里:

http://en.wikipedia.org/wiki/OLE_Automation

这篇关于如何阅读从Excel US preadsheet数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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