Page 1 of 1
Extracting database into spreadsheet format?
Posted: Fri Feb 10, 2012 11:47 pm
by BKarchitect
Is there anyway to do this? Or rather...does a utility exist for this? I'd love to be able to extract all the player attributes from the DB into a sortable format.
Thanks a bunch!
Re: Extracting database into spreadsheet format?
Posted: Sat Feb 11, 2012 12:18 am
by nino33
BKarchitect wrote:Extracting database into spreadsheet format? Is there anyway to do this?
No, there is no way to do this (other than manually!).
Re: Extracting database into spreadsheet format?
Posted: Sat Feb 11, 2012 12:35 am
by BKarchitect
Fun! Thanks

Re: Extracting database into spreadsheet format?
Posted: Sat Feb 11, 2012 11:05 am
by archibalduk
Yes, it's possible - but only if you're happy to get your hands dirty with C/C++ programming. I've written utilities to extract various parts of the database into spreadsheet format (.CSV to be precise) but haven't done anything with the player attributes yet. It's very simple to do once you get your head around some basic coding.
If you are willing to give C++ a try then read
my tutorial here. The tutorial explains how to convert index.dat into a spreadsheet and can easily be adapted for other dat files. There's also various other relevant information if you read through that thread.
Of course you can only export the data/attributes for the purposes of editing EHM. You can't go about using the data for other purposes / games as this would be stealing SI Games' intellectual property.
Re: Extracting database into spreadsheet format?
Posted: Sat Feb 11, 2012 11:27 pm
by BKarchitect
Thanks archi...don't have any experience with C++ but I will give it a go
No worries about my motives, just an EHM obsessed hockey fan.
Re: Extracting database into spreadsheet format?
Posted: Sat Feb 11, 2012 11:38 pm
by archibalduk
If it is of any help, I didn't have any programming experience (except html/php/sql) before I wrote the Custom Start Date Patch. It's not all that bad so long as you start off simple and then build from there.
If you follow the tutorial I posted (all you have to do is copy and paste my code) then you'll be well on your way. I'm happy to answer questions in that thread too. I do intend to post some further tutorials (such as how to import your modified spreadsheets back into the database) but I'm crazy busy with other things at the moment!
Re: Extracting database into spreadsheet format?
Posted: Sun Feb 12, 2012 12:50 am
by nino33
BKarchitect wrote:Extracting database into spreadsheet format? Is there anyway to do this?
nino33 wrote:No, there is no way to do this (other than manually!).
archibalduk wrote:Yes, it's possible - but only if you're happy to get your hands dirty with C/C++ programming
BKarchitect wrote:Thanks archi...don't have any experience with C++ but I will give it a go
My apologies for my mistake...I'm glad I was wrong!
Good luck to you in your efforts BKarchitect!
Re: Extracting database into spreadsheet format?
Posted: Thu Feb 16, 2012 12:43 pm
by YZG
Hmm... very interesting. Shall we conclude that the opposite is equally true? Can one convert a .csv file into a .dat file using the same kind of program? Now THAT would make mass-editing a simpler process!
- YZG
Re: Extracting database into spreadsheet format?
Posted: Thu Feb 16, 2012 6:12 pm
by nino33
YZG wrote:Shall we conclude that the opposite is equally true? Can one convert a .csv file into a .dat file
Yes! That's how the current project for updating the History in EHM works....from dat to csv, add History, then csv back to dat (thanks to Arch!)
Re: Extracting database into spreadsheet format?
Posted: Thu Feb 16, 2012 7:50 pm
by archibalduk
What Nino said. This can be done with any or all of the dat files.
We have been successfully editing the player and competition histories and team records successfully by exporting them into Excel/Access, making changes and then reimporting them to the dat (and finally updating the index.dat which can be done automatically with a simple script).
Re: Extracting database into spreadsheet format?
Posted: Thu Feb 16, 2012 9:58 pm
by YZG
Awesome. Where was I when it became common knowledge?? Can't believe I missed that! I'll have to try it someday.
- YZG
Re: Extracting database into spreadsheet format?
Posted: Fri Feb 17, 2012 8:56 am
by archibalduk
To be fair, you've probably been too busy running the Dabo research to notice this previously!!
