I’m also referring to this post about using JavaScript to import CSV into database:
I have the below script
Sub ABData()
'https://www.mail-archive.com/amibroker@yahoogroups.com/msg45323.html
Dim Amibroker As Object
Set Amibroker = CreateObject("Broker.application")
AmiBroker.Import(0,"E:\Intraday.csv", "custom1.format")
Amibroker.RefreshAll
Set ActiveDoc = Nothing
Set Amibroker = Nothing
End Sub
I got error when coming to the Amibroker.Import line. The error says “=” is expected.
Thanks TJ for you reply. Somebody has also PMed me another way to achieve this by adding ‘Call’ in front of the Amibroker.Import() function.
Sub ABData()
Dim Amibroker As Object
Set Amibroker = CreateObject("Broker.application")
Call Amibroker.Import(0,"E:\Intraday.csv", "custom1.format")
Call Amibroker.RefreshAll
Set Amibroker = Nothing
End Sub
Thanks TJ for javascript recommendation, I notice that almost everyone are using js here.
I already have a spreadsheet set up as my ‘dashboard’. so just exploring the possibility to reach Amibroker via a button in excel. As expected, it is achievable. Amibroker is superb!
Is there a way to run or call a javascript from within Excel VBA? That would be awesome!