Excel development with Delphi

What kind of relationship exists between Delphi and Excel? Delphi is seldom associated with Microsoft Excel. And some people spread the rumor that Managed Code is the best practice for Excel Add-Ons. But it is baseless. Microsoft provides a C-API. And in the old days of Visual Studio 6, VB was a good choice too.

It’s just hard to find good resources that support the Excel development with Delphi. A web search on Delphi plus Excel provides many results. But most results are related to Excel Automation with Delphi. Countless articles describe the use of the Office Server Components that were shipped with Delphi. Results of such coding are not the best in every case. This is not a problem related to Delphi programmers. It does not depend on the chosen programming language. Every Data Analyst knows the challenge related to data sources that are reports of any system. The reporting tools produce Excel files using OLE Automation. We found numbers formatted as text, no matter what programming language was used. But I wander from the subject.

The development of XLL Add-Ins is still an important part of Microsoft Excel Enhancements. At the day of writing, the Excel Software Development Kit for Excel 2013 is waiting in the wings to be available along with the new Microsoft Office Version. In contrast, there’s only one well known article that tells about development of XLL Add-Ins with Delphi. This article of David Bolton was originally published in The Delphi Magazine. You can find it on the Web, e.g. at ASP/free. This article is inspiring but a bit strange as well. Hence, some big changes were introduced with Excel 2007 and Excel 2010 is targeting 64 Bit environments. But Delphi related information is not available.

Another important area is the development of Automation Add-Ins and COM Add-Ins. You need some knowledge of COM development if you want to develop Automation Add-Ins and COM Add-Ins. You could read the book Delphi COM Programming if you’re not familiar with COM. The German reader should try COM/DCOM/COM+ mit Delphi. But if you got the COM basics, you need additional information about the Excel Extensibility. It is difficult to find Delphi related information on it. A web search will bring you to the one commercial Delphi Component that exists. Maybe, it’s a good choice for the click ’n go programmer. But, blow money is not the best advice if you want to know how it works. It’s not a criticism of excellence but criticism of the availability of information. You should pick up the C-related information instead.

Against all odds, Delphi is a good choice for Excel development. Try it!

2 thoughts on “Excel development with Delphi

  1. John Drummond

    Thank you for what you’ve written, most helpful.
    Any change you’re likely to publish the ported xlcall.h file as a dot pas file? I can find the DCU’s for other versions of delphi which you’ve kindly sent, but not the source.
    Thanks again.
    Kind Regards, John.

    Reply

Leave a Reply

Your email address will not be published.