Which Should I Use?

When Microsoft Excel 4.0 shipped this was not a question. A developer wishing to extend Microsoft Excel with C would use the C API. The question is not quite so simple any longer. We now have two different extension methods each with their own strengths and weaknesses. Beyond these strengths and weaknesses there is no reason to write to one API vs. the other. If you are starting a new project, OLE Automation is generally the best choice. If you have a lot of existing code implemented using the C API, don't blindly port it to use OLE Automation just because it is the newest of the two APIs. The following discussion focuses on the compromises experienced when selecting one of the APIs over the other.