Need some help modifying xls export script

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

EinsteinX
Posts: 31
Joined: Thu Feb 04, 2010 2:29 pm

Need some help modifying xls export script

Post by EinsteinX »

I'm trying to modify the export to Excel spreadsheet script that runs from FILE > CREATE REPORTS > TRACK LIST (EXCEL). In my spreadsheet I want to add some additional field that in the default version of this script aren't filled in. I can't get the script to write the track numbers to the spreadsheet nor can I get it to fill a column with the media type (i.e. mp3, flag, acc).

To the script I added:
WS.Cells(i+2,4).Value = itm.TrackNumber

but TrackNumber is not recognized as a field in the database, even though WS.Cells(i+2,3).Value = itm.DiscNumber works fine. Looking in the wiki here: http://www.mediamonkey.com/wiki/index.p ... _structure it seems like TrackNumber should work, but for some reason it doesn't. I also tried WS.Cells(i+2,4).Value = itm.PlaybackPos, but that also didn't work.

To get the media type I added to the script:
WS.Cells(i+2,17).Value = itm.Type

But the media type isn't filled in. I also tried to change it to: WS.Cells(i+2,17).Value = itm.MediaType, but this also didn't change anything.

Does anyone know what I am doing wrong?

Eins
Lowlander
Posts: 56630
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: Need some help modifying xls export script

Post by Lowlander »

You might want to try the Custom Report addon instead: http://www.mediamonkey.com/forum/viewto ... tom+report
EinsteinX
Posts: 31
Joined: Thu Feb 04, 2010 2:29 pm

Re: Need some help modifying xls report script

Post by EinsteinX »

OK, I found that the Track Number is stored in: TrackOrderStr, that now works, but I still can't find Media Type. Additionally, I'm now also interested to find the file name in the database. Anyone?

Maybe I should tell what I'm trying to do:

My Symbian phone does not understand the m3u playlist as I extract them from the MM database. So I'm trying to modify the xls report script in such a way that I can make Excel change the export to an m3u playlist that my phone understands. In fact it would be cool if I can make a script that would do the full conversion for me, but I'm not as smart with visual basic as with Excel yet.

EIns
Lowlander
Posts: 56630
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: Need some help modifying xls export script

Post by Lowlander »

EinsteinX
Posts: 31
Joined: Thu Feb 04, 2010 2:29 pm

Re: Need some help modifying xls export script

Post by EinsteinX »

Tx, Lowlander for that wiki, but I already linked to it in my original post. Even with that wiki I still can't find the correct names for Media Type and File Name. In the entire picture there is no field named FileName or sth like it, so I was hoping for someone that knows how this is called in the MM database as the wiki doesn't help me further.

Eins
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Need some help modifying xls export script

Post by trixmoto »

You can split the Filename out from the Path, they're not held separately.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
EinsteinX
Posts: 31
Joined: Thu Feb 04, 2010 2:29 pm

Re: Need some help modifying xls export script

Post by EinsteinX »

trixmoto wrote:You can split the Filename out from the Path, they're not held separately.
Bummer! I was trying to avoid that, cuz it makes my spreadsheet a little simpler.
Tx for the tip.

Eins
Post Reply