Page 1 of 1
[SOLVED] Processing MMEX JSON Export in Go/Golang
Posted: Sat Oct 21, 2023 11:00 am
by strongbow
I have written a Python program which takes an MMEX JSON export and creates an Excel spreadsheet.
I am rewriting the program in Go. In the Go version I am not able to correctly describe the format of the MMEX JSON export, so I cannot import and unmarshall the MMEX export. I suspect my failure is due to me doing something silly missing something obvious.
If anyone has done this successfully I would love to know how.
Re: Processing MMEX JSON Export in Go/Golang
Posted: Sat Oct 21, 2023 12:07 pm
by Renato
Why don't you access the .mmb database directly in Excel.
What kind of evaluations do you do with it in Excel.
I solved my problem like this:
viewtopic.php?f=10&t=9549&p=20427&hilit=odbc#p20427
Re: Processing MMEX JSON Export in Go/Golang
Posted: Sun Oct 22, 2023 9:54 am
by Curcuma
I also believe it is easier to connect Excel directly to the database.
I have done it using Power Query in Excel (Microsoft 365 version) through Data > Get Data > From Other Sources > Blank Query
That takes you to Query in Power Query. Once in Power Query , if you go to View > Advanced Editor, you can copy and paste the M query code:
Code: Select all
let
Source = Odbc.DataSource("database=C:\FullPathToYourMMBFileHere.mmb;dsn=SQLite3 Datasource", [HierarchicalNavigation=true]),
ACCOUNTLIST_V1_Table = Source{[Name="ACCOUNTLIST_V1",Kind="Table"]}[Data]
in
ACCOUNTLIST_V1_Table
This will load the Account List into Excel. Enter the path to your mmb file and changing the Name in the query you can get any other table you need.
I hope it helps.
Re: Processing MMEX JSON Export in Go/Golang
Posted: Mon Oct 23, 2023 8:05 am
by strongbow
Many, many thanks to Renato and Curcuma for the sensible and useful advice.
I have solved my immediate problem.
Re: Processing MMEX JSON Export in Go/Golang
Posted: Mon Oct 23, 2023 10:06 am
by Renato
Thank you, We are always happy to receive positive feedback.