Accessing the database from Excel

This forum is for questions / discussions regarding development of addons / tweaks for MediaMonkey.

Moderators: Gurus, Addon Administrators

Posts: 1
Joined: Sat May 21, 2016 9:10 am

Accessing the database from Excel

Post 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.
Posts: 829
Joined: Sun Sep 21, 2008 9:35 pm
Location: Cupertino, California

Re: Accessing the database from Excel

Post 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.
Posts: 1308
Joined: Mon Oct 17, 2011 8:28 am
Location: Central Europe

Re: Accessing the database from Excel

Post 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.
Magic Nodes v4.3.3 (2018-10-03) last free version SQL Viewer v2.4 (2009-10-25)
ExternalTools v1.4 (2011-05-09) iTunesMonkey 1.0 + Acoustid
Calculate Cover Size v1.7 (2012-10-23) RegExp Find & Replace v4.4.9 (2018-10-03) last free version
Posts: 594
Joined: Thu Jul 25, 2013 4:17 am

Re: Accessing the database from Excel

Post 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.
Post Reply