Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#273067 - 30/12/2005 05:28 CSV to MS Word Catalogue Macro
Shonky
pooh-bah

Registered: 12/01/2002
Posts: 2009
Loc: Brisbane, Australia
Technically not an empeg problem - really an Excel problem.

I started playing with the CSV to Word catalogue macro that eslange made ( http://home.wanadoo.nl/~eslange/Empeg/EmpCatMain.htm ). For the most part it works quite well.

The way it works is it loads in the CSV file generated by emplode into Excel and pulls all the useful info out of it to create the Word document. I have quite a few ripped MP3s where the track tag is something like 01/12, 02/12 etc. Excel decides when importing that these are dates and I end up with track numbers of 01/12/2005 etc.

Any ideas on how I could get around this?

I tried changing my date delimiter in Windows regional settings but it seems Excel is simply too smart for it's own good. I can't find an option to turn it off either.

I don't really understand how the macro works and the author has password prtotected it anyway.

Thanks
_________________________
Christian
#40104192 120Gb (no longer in my E36 M3, won't fit the E46 M3)

Top
#273068 - 30/12/2005 05:53 Re: CSV to MS Word Catalogue Macro [Re: Shonky]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31565
Loc: Seattle, WA
Date format is something you set on the field itself in excel. Not in windows generally.

Just select the offending fields and change the format.
_________________________
Tony Fabris

Top
#273069 - 30/12/2005 05:59 Re: CSV to MS Word Catalogue Macro [Re: tfabris]
Shonky
pooh-bah

Registered: 12/01/2002
Posts: 2009
Loc: Brisbane, Australia
Quote:
Date format is something you set on the field itself in excel. Not in windows generally.

Just select the offending fields and change the format.

Doesn't work like that. The Word macro uses Excel via a VBA macro to pull apart the .csv file. You never see Excel, thus you don't get the chance to select formatting or anything.

Even then it still mucks it up. Try entering 01/12 in Excel and then change the format back to normal and you get 38687 since it's already converted it to it's internal date representation (number of days since 1900 I think). The only way to do it is to put an apostrophe so Excel leaves it alone. But I can't do that.
_________________________
Christian
#40104192 120Gb (no longer in my E36 M3, won't fit the E46 M3)

Top
#273070 - 30/12/2005 06:02 Re: CSV to MS Word Catalogue Macro [Re: Shonky]
Shonky
pooh-bah

Registered: 12/01/2002
Posts: 2009
Loc: Brisbane, Australia
And you can't load the CSV in Excel and play from there since it decides to convert the fid links which are just numbers separated by commas in to massive numbers.
_________________________
Christian
#40104192 120Gb (no longer in my E36 M3, won't fit the E46 M3)

Top
#273071 - 30/12/2005 13:35 Re: CSV to MS Word Catalogue Macro [Re: Shonky]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31565
Loc: Seattle, WA
Ah. Gotcha. Well, then I guess you're right, the only fix is to modify the macro. Or to write your own.
_________________________
Tony Fabris

Top
#273072 - 30/12/2005 14:20 Re: CSV to MS Word Catalogue Macro [Re: Shonky]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
I would open up Excel and search in its preferences for something like automatic input interpretation and turn it off. That is, I'm pretty sure that there's an option somewhere that tells Excel to translate input to what it thinks it is, including stuff like turning strings with at-signs into mailto links and so on. I would expect that Excel would honor that setting even in a macro where you don't see the Excel GUI.
_________________________
Bitt Faulk

Top
#273073 - 03/01/2006 23:01 Re: CSV to MS Word Catalogue Macro [Re: wfaulk]
Shonky
pooh-bah

Registered: 12/01/2002
Posts: 2009
Loc: Brisbane, Australia
Quote:
I would open up Excel and search in its preferences for something like automatic input interpretation and turn it off. That is, I'm pretty sure that there's an option somewhere that tells Excel to translate input to what it thinks it is, including stuff like turning strings with at-signs into mailto links and so on. I would expect that Excel would honor that setting even in a macro where you don't see the Excel GUI.

I did have a pretty good look and google around for info on setting this, but could find anything. I also would have expected Excel to have the option at least. I will look again.

I sent an email to the author but no reply, so I did a bad thing and cracked the macro password. By doing that I can stop the macro part way and fix things up a bit using a custom format. It's not a total fix though since by that stage Excel has already munged the xx/yy formats into it's serial number and I can't fix everything unless I do it manually.

I guess another option (that I just thought of) is write some simple perl to fix up the CSV before loading it.
_________________________
Christian
#40104192 120Gb (no longer in my E36 M3, won't fit the E46 M3)

Top
#273074 - 04/01/2006 06:11 Re: CSV to MS Word Catalogue Macro [Re: Shonky]
eslange
journeyman

Registered: 16/11/2001
Posts: 74
Loc: Utrecht, Netherlands
Quote:

I sent an email to the author but no reply, so I did a bad thing and cracked the macro password.


Well.... well... well
Never mind
I'm not realy active here anymore and very busy with other things so I have to confess that snooping around this forum has become a bit...
Anyway.... just back from holiday and saw your email so I checked it now.
So you've cracked the password How long did it took? It was a quite long password. I've no problems with it, but please do not distribute it further.

I'm no Excel guru, neither macro guy so if you still have problems we can take a better look at it. I agree with wfaulk regarding autoformatiing, but we can also implement a work-around in the macro.

Gotta go now... this was just a quick reaction (you've private mail too).
Cya

Top
#273075 - 04/01/2006 13:35 Re: CSV to MS Word Catalogue Macro [Re: eslange]
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5914
Loc: Wivenhoe, Essex, UK
Quote:

So you've cracked the password How long did it took? It was a quite long password. I've no problems with it, but please do not distribute it further.

I'm no Excel guru, neither macro guy so if you still have problems we can take a better look at it. I agree with wfaulk regarding autoformatiing, but we can also implement a work-around in the macro.



Maybe it would be a good idea to post a non-passworded copy, then a few other people can work on fixing it ?
_________________________
Remind me to change my signature to something more interesting someday

Top
#273076 - 05/01/2006 09:01 Re: CSV to MS Word Catalogue Macro [Re: eslange]
RCCola
new poster

Registered: 05/01/2006
Posts: 2
Cracking an Office password is rather easy, ya don't even have to bruteforce it. Several programs will do the trick.

Top
#273077 - 07/01/2006 01:23 Re: CSV to MS Word Catalogue Macro [Re: eslange]
AndrewT
old hand

Registered: 16/02/2002
Posts: 867
Loc: Oxford, UK
Quote:
I'm not realy active here anymore

You can checkout any time you like.....

Top
#273078 - 07/01/2006 03:01 Re: CSV to MS Word Catalogue Macro [Re: AndrewT]
JBjorgen
carpal tunnel

Registered: 19/01/2002
Posts: 3582
Loc: Columbus, OH
_________________________
~ John

Top
#273079 - 07/01/2006 05:36 Re: CSV to MS Word Catalogue Macro [Re: JBjorgen]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31565
Loc: Seattle, WA
Gah. Full of mondegreens.
Argh.

Quote:
Her mind is tiffany-twisted, she got the mercedes bends

No no no.

ARgh....
_________________________
Tony Fabris

Top
#273080 - 07/01/2006 10:20 Re: CSV to MS Word Catalogue Macro [Re: tfabris]
JBjorgen
carpal tunnel

Registered: 19/01/2002
Posts: 3582
Loc: Columbus, OH
From an article about mondegreens:
Quote:
Frankly speaking, sometimes the words are nonsensical and it is understandable that they confuse the listener. A great many people thought that the woman described in "Hotel California" had a Mercedes Benz. No, she had Mercedes bends, something the leader of the band, the Eagles, straightened out many times.
_________________________
~ John

Top
#273081 - 07/01/2006 15:59 Re: CSV to MS Word Catalogue Macro [Re: JBjorgen]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31565
Loc: Seattle, WA
But...

It only makes sense the other way.

I gotta get Gary to corner Don about that some time.
_________________________
Tony Fabris

Top
#273082 - 07/01/2006 20:11 Re: CSV to MS Word Catalogue Macro [Re: tfabris]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Um, it's a pun. A bad pun. One befitting such a terrible band.
_________________________
Bitt Faulk

Top