• Welcome to PlanetSquires Forums.
 

FB skeleton code for making generic XLL files for use with Excel 32 Bit

Started by Eigil Dingsor, May 14, 2018, 03:55:34 PM

Previous topic - Next topic

Eigil Dingsor

Hi,
I've programmed  xll files for Excel in PowerBasic for more than 20 years. At some stage I'll have to switch to  Excel 64 bit and then my Excel 32 bit add-ins will become obsolete. In order to stay ahead I've started to convert my PB code to FB since PB is only 32bit. At first into FB 32 bit code.
The enclosed zip file contains the neccesary files that enables you to make your own Excel add-ins.

Eigil

Andrew Lindsay

Eigil,

Let me say thank you for sharing this with the community.  I have used your framework in PowerBasic many, many times.  It has saved me literally days in processing time over the years, from having spreadsheets that take an hour to process to reduce that down to a couple of minutes or even quicker has been an absolute godsend.

It has literally made an unworkable solution workable, on so many occasions. 

Thank you.

Andrew

Eigil Dingsor

Hi Andrew,
Thanks for kind words. I believe in sharing and not re-inventing the wheel over and over again. I'm very new to FB, but like the mix of Basic and C syntax and also the ability to compile c code as static libraries  into final FB code. Saves a lot of re-coding.
Eigil

Eigil Dingsor

Hi,
I finally got the time to convert the Excel 2007+ entry code functions from C/C++ to Freebasic. You no longer have to include the GCC compiled C static library in your code. Just replace with XLCALL32_CPP.BAS file. Now it will  be even easier to migrate from a 32bit to 64bit world.

Have also changed  code in framewrkc.bi module to get the TempInt/TempInt12 to work properly when calling Excel4/Excel12 functions.
See line: DIM SHARED  vMemBlock(MEMORYSIZE)as BYTE ' Memory for temporary XLOPERs
Enjoy and post questions if you have any!

Eigil


Andrew Lindsay

Egil,


I'm about to write some more Excel macro commands (first foray into possibly needing x64).  Have you made any additional tweaks to your skeleton from the V.2 option you previously posted?


Regards
Andrew

Eigil Dingsor

Hi Andrew,
Haven't added/changed anything since latest posting v.2.
Eigil

Eigil Dingsor

Hi,Skeleton files have been added and updated and now can be compiled into 32bit or 64 bit code without alterations.NB! Read extra info the Readme .... text file.
Enjoy
Eigil

Eigil Dingsor

Hi,
Found some errors in converted memorypool/manager code  for temporary xlopers that sometimes caused crash when compiled into 64 bit. Hopefully that has been taken care of.
Updated zip file with new memorypool.bi and memorymanager.bi files
Eigil

Andrew Lindsay

Eigil,

As always your code for working with XLL is greatly appreciated.

The ability to create native XLL files for Excl has meant lots of stuff that is either too slow in VBA or not secure enough has been able to see the light of day.

Thanks.

best regards

Andrew