Page 1 of 1

Accessing the database from Excel

Posted: Sat May 21, 2016 12:41 pm
by Snyde
Hey, new guy here. Not even sure this is the right place to post this but here goes:

I would like to access the data in the database files from Excel so I can do some statistics work on the music that I listen to. Is there a way to do this so that, for example, when I change some metadata around, it automatically updates whatever I have on the Excel file?

Currently I am working with an excel file with one sheet as the extracted Excel report (default MM feature) but when I add items to the library manually and it's a pain in the ass. Other than accessing the database directly, is there a better way to do what I'm trying to do?

Thanks in advance.

Re: Accessing the database from Excel

Posted: Wed May 25, 2016 9:35 pm
by mcow
Are you already scripting Excel? Do you use VB for that? If so, you can write scripts that will access MediaMonkey.

From Excel, the basic approach would be to scan all files periodically. That might be too slow. It might be possible to write a script that runs in MediaMonkey and exports the changes or at least exports the track ID that changes so that the Excel script can update it. But I haven't done anything with code that monitors database changes.

Re: Accessing the database from Excel

Posted: Thu May 26, 2016 1:46 am
by MMuser2011
You could try to separate the data exported from MediaMonkey and your own data.
Add one worksheet with the data from MediaMonkey and one worksheet with your own informations.
Then associate an unique id from the first worksheet with a the same id in your own data.
Whenever you update the MediaMonkey export, your own data will not be touched.

In Excel you will find some formulas to identify which entries are new. Or you can use a "changed date" date to see, when and which entries has been modified.

This is just an idea, I can not send you a working Excel solution.

Re: Accessing the database from Excel

Posted: Sun May 29, 2016 5:13 am
by rivorson
The easy option would be to use the Custom Reports script that can be found in the forum. That will let you export much more data than the default report, including MM's database ID for each track. Then when you analyse that report in Excel you can simply check for IDs that aren't already in your main sheet to identify new tracks.