How To Automate Excel From C++ Without Using MFC or #import (216686)
The information in this article applies to:
- Microsoft Office Excel 2003
- Microsoft Excel 2002
- Microsoft Excel 2000
- Microsoft Excel 97 for Windows
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
This article was previously published under Q216686 SUMMARY There are several advantages to writing your Automation
code in straight C++. First and foremost, you can do exactly what you want.
Next, your code will be smaller, faster, and easier to debug. And finally, you
won't be dependent on any libraries. Even if you are dedicated to using MFC's
wrapper classes or Visual C++'s native COM support (#import), you may still
have to delve into the guts of IDispatch and COM Automation in order to work
around common bugs and limitations with these frameworks. REFERENCES
For additional information about automating Office by using Visual C++, click the following article numbers to view the articles in the Microsoft Knowledge Base:
196776
Office Automation Using Visual C++
216388 FILE: B2CSE.exe Converts Visual Basic Automation Code to Visual C++
(c) Microsoft Corporation 1999, All Rights Reserved.
Contributions by Joe Crump, Microsoft Corporation.
| Modification Type: | Minor | Last Reviewed: | 6/29/2004 |
|---|
| Keywords: | kbAutomation kbhowto KB216686 |
|---|
|