您的位置:首页 > 移动开发 > Objective-C

VC对EXCEL操作

2010-12-08 15:57 288 查看
这篇比较全面: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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息