Can COM use Excel as an in-process DLL?

masterjodi 40 Reputation points


I would to ask about Excel COM operation.

 To connect to Excel from another C++ process is well established:

#import "C:\\Program Files (x86)\\Common Files\\microsoft shared\\OFFICE11\\MSO.DLL"
#import "C:\\Program Files (x86)\\Common Files\\microsoft shared\\VBA\\VBA6\\VBE6EXT.OLB"
#import "C:\\Program Files (x86)\\Microsoft Office\\OFFICE11\\EXCEL.EXE"

and the use CoInitialize() and other standard COM practices. However, COM marshaling between processes incurs performance penalty, albeit very little. If large amount of data is to be processed with Excel, it is desirable to embed Excel as an in-process DLL within the calling process.

I didn’t find a way to do that. Does Excel support this by design?


A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.
1,363 questions
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
1,545 questions
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,564 questions
0 comments No comments
{count} votes

Accepted answer
  1. RLWA32 41,046 Reputation points

    it is desirable to embed Excel as an in-process DLL within the calling process.

    This cannot be done. Excel is designed to run as a out-of-process COM server.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. masterjodi 40 Reputation points


    Excel is very handy. However its plotting does not seem to specialize in drawing mathematical functions like MATLAB or Mathematica.

    Does it actually capable of drawing very appealing math function graphs? Does Mircosoft have any product which does a good job for this?