惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
J
Java Code Geeks
I
InfoQ
V
Visual Studio Blog
M
MIT News - Artificial intelligence
H
Help Net Security
博客园_首页
Blog — PlanetScale
Blog — PlanetScale
F
Fortinet All Blogs
Apple Machine Learning Research
Apple Machine Learning Research
人人都是产品经理
人人都是产品经理
G
Google Developers Blog
A
About on SuperTechFans
腾讯CDC
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Last Week in AI
Last Week in AI
小众软件
小众软件
aimingoo的专栏
aimingoo的专栏
罗磊的独立博客
大猫的无限游戏
大猫的无限游戏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
云风的 BLOG
云风的 BLOG
S
SegmentFault 最新的问题
WordPress大学
WordPress大学

博客园 - slaughter

java api下载网站 国外好的软件测试网站 watir,ruby版本查看方法 - slaughter - 博客园 Watir隐藏IE运行的方法 Ruby对MS Access的操作 Eclipse下安装RDT (转)什么是Unicode?什么是UTF-8?(1) Ruby的库路径 - slaughter - 博客园 ruby下snmp-trap发包实例 - slaughter - 博客园 Ruby对于串口的设置实例 - slaughter - 博客园 职业选择(转) ruby编码中碰到的一个诡异问题 - slaughter - 博客园 java读写文件(转) 在Java中操纵UDP(转) 在Java中使用UDP协议编程的相关类(转) 终于给宝宝确定了名字 RFT的对象识别技术 Ruby设置IE不可见 Ruby转exe方法(转)
VC对EXCEL操作
slaughter · 2008-05-07 · via 博客园 - slaughter

这篇比较全面:Office Automation Using Visual C++
  http://support.microsoft.com/kb/196776/EN-US/

这篇为具体的示例:How to use MFC to automate Excel and create and format a new workbook

http://support.microsoft.com/kb/179706/EN-US/

以下转其他人的总结:
在VC中操作Excel, 我们会用到Automation (自动化) 技术。Automation是一种基于COM的技术。它的出现使得跨应用程序的操作成为可能。下面这篇KB总结了关于学习Automation的资料:

Q152023 Locating Resources to Study Automation
http://support.microsoft.com/support/kb/articles/q152/0/23.asp

此外,我们还需要了解Excel的Object Model。通常,我们可以在Excel中将所需的宏录制下来,加以修改后翻译成VC的代码。要了解Excel的Object Model,可以参阅MSDN关于Office开发的文章。

http://msdn.microsoft.com/library/en-us/modcore/html/deovrMicrosoftExcel2000.asp

Excel中的帮助文档也非常有用。另外,请参阅以下KB文章。它们包含了一些例程和相关资料:

Q184663 HOWTO: Embed and Automate a Microsoft Excel Worksheet with MFC
http://support.microsoft.com/support/kb/articles/q184/6/63.asp

Q186120 HOWTO: Use MFC to Automate Excel and Fill a Range with an Array
http://support.microsoft.com/support/kb/articles/q186/1/20.asp

Q216686 HOWTO: Automate Excel From C++ Without Using MFC or #import
http://support.microsoft.com/support/kb/articles/q216/6/86.asp

Q222101 HOWTO: Find and Use Office Object Model Documentation
http://support.microsoft.com/support/kb/articles/q222/1/01.asp

Q196776 FAQ: Office Automation Using Visual C++
http://support.microsoft.com/support/kb/articles/q196/7/76.asp