Need some help modifying xls export script

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Need some help modifying xls export script

Re: Need some help modifying xls export script

by EinsteinX » Mon Apr 04, 2011 11:51 pm

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

Re: Need some help modifying xls export script

by trixmoto » Sun Apr 03, 2011 8:46 am

You can split the Filename out from the Path, they're not held separately.

Re: Need some help modifying xls export script

by EinsteinX » Fri Apr 01, 2011 10:08 pm

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

Re: Need some help modifying xls export script

by Lowlander » Fri Apr 01, 2011 9:35 am

Re: Need some help modifying xls report script

by EinsteinX » Fri Apr 01, 2011 7:22 am

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

Re: Need some help modifying xls export script

by Lowlander » Tue Mar 29, 2011 11:39 am

You might want to try the Custom Report addon instead: http://www.mediamonkey.com/forum/viewto ... tom+report

Need some help modifying xls export script

by EinsteinX » Tue Mar 29, 2011 11:16 am

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

Top