govert / SQLiteForExcel

A lightweight wrapper to give access to the SQLite3 library from VBA.
MIT License
260 stars 82 forks source link

How to add SQLite Amalgamation function to SQLiteForExcel #15

Open finlabhk opened 2 years ago

finlabhk commented 2 years ago

I found that sqlite.com provide an extension file for adding extra function on sqlite, such as SQRT(). This function is really important for my daily operation. But I dont know how to add the extension to SQLiteForExcel. Is it possible to add those extension to SQLiteForExcel?

Thank you very much for contributing this amazing package. I am so happy to convert my old dbf files to sqlite and operating them by excel.

govert commented 2 years ago

Using a VBA function as a custom function in SQLite is not something you can do with the library as it is now. Under 32-bit Excel you would need some conversion for the calling convention, and then understand exactly how the VBA functions and structures must look.

You might consider moving things to .NET, where I think the SQLite library does allow custom functions. Or otherwise make a custom C/C++ component for your needs.