[MS.Excel] Create an Application using AHK and Excel, AHK for user interface and Excel for a Database Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
HiSoKa
Posts: 480
Joined: 27 Jan 2020, 15:43

[MS.Excel] Create an Application using AHK and Excel, AHK for user interface and Excel for a Database

Post by HiSoKa » 17 Aug 2022, 02:22

Hello,
I plan to do some Application using AHK and MS.Excel.
AHK for user interface and Excel for database.
So that I can handle with a database using AHK like Reading,Writing,Update and Delete..
I know that it is better to use someting like SQL Database, because Excel is slow when it comes to millions of lines,
But in my case my database will be few, maybe a few thousand lines,
Which is for example For details of customers, Products, Monthly sales reports, etc...
And I want to use AHK with Excel for ease of creation Form and GUI using it and I can have more control over the base of the inputs, for example I can use Regex to make to specify the user input ... etc..

Is this a good idea, or do you have other suggestions...
Thank you..

User avatar
flyingDman
Posts: 2791
Joined: 29 Sep 2013, 19:01

Re: [MS.Excel] Create an Application using AHK and Excel, AHK for user interface and Excel for a Database  Topic is solved

Post by flyingDman » 17 Aug 2022, 12:20

You can use an Excel file as database and AHK as user interface, but if your use is really limited to "reading, writing, updating and deleting" a CSV file might be better (see here for a CSV library). With Excel, the reading and writing can be very slow - even if you only deal with a few thousand records - if you try to loop through ranges and call on Excel to extract (or write to) one cell at the time. However, you can read a whole range at the time using range().copy or using safearrays. Then, there is only one COM call and speed gain is very significant. You can also use ADOdb to read an excel file. This provides speed gains over the copy and safearray methods. In this (viewtopic.php?style=19&t=99931#p444007) example, I go through 50 excel files and extract some data from each file in ~2 seconds. See here (viewtopic.php?style=2&t=102348&p=455148#p454989) for a function using this technique.
14.3 & 1.3.7

User avatar
HiSoKa
Posts: 480
Joined: 27 Jan 2020, 15:43

Re: [MS.Excel] Create an Application using AHK and Excel, AHK for user interface and Excel for a Database

Post by HiSoKa » 17 Aug 2022, 12:47

Your support helped me a lot, Thank you with all my heart..
I prefer to use Excel because it creation Dashboard for my data more easily ,
I Will Research about ADOdb to know how it work with Excel...
Thanks Again :salute:

Post Reply

Return to “Ask for Help (v1)”