How To Automate Excel to Create And Format a New Workbook Using C++ .NET and MFC (308292)
The information in this article applies to:
- Microsoft Visual C++ .NET (2003)
- Microsoft Visual C++ .NET (2002)
- Microsoft Foundation Classes (MFC)
- Microsoft Office Excel 2003
- Microsoft Excel 2002
- Microsoft Excel 2000
This article was previously published under Q308292 For a Microsoft Visual Basic .NET version of this
article, see
301982. For a Microsoft Visual C#
.NET version of this article, see
302084. Note Microsoft Visual C++ .NET (2002) supports both the managed code
model that is provided by the Microsoft .NET Framework and the unmanaged native
Microsoft Windows code model. The information in this article applies only to
unmanaged Visual C++ code. SUMMARY This article demonstrates how to create an Automation
client for Excel by using Microsoft Foundation Classes (MFC) and Visual C++
.NET. Troubleshooting If you add class wrappers for the Excel object library by using
the File option in the Add Class From TypeLib Wizard, you may receive an
error message when you browse to the object library. To avoid this problem,
type the full path and file name for the object library instead of browsing to
the file.
For additional information, click the
article number below to view the article in the Microsoft Knowledge Base: 311408 BUG: 'Read-Only' Warning When Adding MFC Class From Library
If you receive the following error message when you
build your sample application, change "Variant DialogBox" in CRange.h to
"Variant _DialogBox": warning C4003: not enough actual
parameters for macro 'DialogBoxA' For more information on the cause
of this error, see the following Knowledge Base article:
311407 BUG: MFC Wizard Doesn't Resolve Naming Conflicts with API Macros
REFERENCESFor additional information on automating Excel by using MFC
and Visual C++ .NET, click the article number below to view the article in the
Microsoft Knowledge Base: 308407 How To Automate Excel From C++ .NET and MFC To Fill or Obtain Data In a Range Using Arrays
Modification Type: | Minor | Last Reviewed: | 6/29/2004 |
---|
Keywords: | kbAutomation kbhowto KB308292 kbAudDeveloper |
---|
|