Hi EverBeginner!
Do you mean to the PowerBASIC program? I'm assuming you do because I have everything needed for the C++ program posted above. PowerBASIC was created by Bob Zale who is one of the premier compiler writers around. He worked with Borland back in their heyday and TurboBasic was his product. After DOS faded away he left Borland and started publishing Win32 Basic compilers, and named his company PowerBASIC. Their stuff is dynamite and few people know of it due to Microsoft's dominance in the development tools business. I use it exclusively for my desktop Windows work and I use C++ for my Windows CE work because PowerBASIC only produces Windows compilers - not Windows CE or Linux. Here's a link...
http://www.powerbasic.com
The above program that reads the Excel data comes in around 39K, which isn't too bad when you figure powerful string handling routines are build right into the language, as well as high level support for COM and OOP. If you want you can write low level COM too, but most folks hate that. I've a number of low level COM tutorials posted here...
http://www.jose.it-berater.org/smfforum/index.php?board=362.0
using both C/C++ and PowerBASIC and at that site are a lot of advanced coders and programming info.
After .NET hit back around 2002 a certain percentage of coders migrated to PowerBASIC because it was a high performance compiled language with a lot of low level capabilities. I'd highly recommend it. The fellow who runs the MASM32 forum - Steve Hutcheson - Hutch...
http://www.movsd.com/masm.htm
is a big PowerBASIC supporter and has a board too at my above link.
That include file listed at the top of the PowerBASIC program...
PBExcel.inc
That is auto generated by the PowerBASIC Ide. That is actually a rather large file because Excel has so many COM methods associated with it. The way it is made is from a menu in the IDE it brings up a Type Library Browser that lists all the installed COM components on a system. You would scroll through them until you found something like 'Microsoft Excel Object Library' or something like that; then you would double click on it and the ide would read the type library and auto-generate that data. You would then save it to any file name you wanted and include it, then the compiler would have all the interface definitions so it could do early binding on the IDispatch interface. Its also possible to not use that file and do late binding, but there is a performance hit with that as two trips to the server are needed. Basically, the IDispatch thing is miserable but with some COM objects that is the only way to connect. I have it on good authority that direct VTable access with Excel doesn't work.