Extracting database into spreadsheet format?
Forum rules
This is the forum to discuss all aspects of editing the EHM data and tweaking the game.
Have a bug or feature request for the EHM Editor? Post them in the EHM Editor thread. Please start a new thread or post in another thread if you have a question about how to use the EHM Editor.
Given the large number of questions on similar topics, we ask that you start a new thread for a new question unless you can locate a similar question in an existing thread. This will hopefully ensure that similar questions do not get buried in large threads.
Useful links: EHM 1 Assistant (Download) | EHM 1 Editor (Download) | EHM 1 Editor Tutorials | Editing Rules & Structures Guide | Converting EHM 2004 / 2005 DBs to EHM 1 | Converting an EHM 2007 DB to EHM 1 | Extra_config.cfg | Import_config.cfg | Player Roles
This is the forum to discuss all aspects of editing the EHM data and tweaking the game.
Have a bug or feature request for the EHM Editor? Post them in the EHM Editor thread. Please start a new thread or post in another thread if you have a question about how to use the EHM Editor.
Given the large number of questions on similar topics, we ask that you start a new thread for a new question unless you can locate a similar question in an existing thread. This will hopefully ensure that similar questions do not get buried in large threads.
Useful links: EHM 1 Assistant (Download) | EHM 1 Editor (Download) | EHM 1 Editor Tutorials | Editing Rules & Structures Guide | Converting EHM 2004 / 2005 DBs to EHM 1 | Converting an EHM 2007 DB to EHM 1 | Extra_config.cfg | Import_config.cfg | Player Roles
-
- Second Line
- Posts: 656
- Joined: Sat Jan 07, 2012 11:21 pm
Extracting database into spreadsheet format?
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!
Thanks a bunch!
- nino33
- Mr. Goalie
- Posts: 6088
- Joined: Sat Aug 07, 2010 3:37 am
- Custom Rank: Retro Rosters Specialist
- Favourite Team: 1970s hockey
Re: Extracting database into spreadsheet format?
No, there is no way to do this (other than manually!).BKarchitect wrote:Extracting database into spreadsheet format? Is there anyway to do this?
-
- Second Line
- Posts: 656
- Joined: Sat Jan 07, 2012 11:21 pm
Re: Extracting database into spreadsheet format?
Fun! Thanks 

- archibalduk
- TBL Admin Team
- Posts: 20373
- Joined: Tue Jul 06, 2004 8:44 pm
- Custom Rank: Seaside + Fruit Juice Mode
- Favourite Team: Guildford (EPL) / Invicta (NIHL)
- Location: United Kingdom
- Contact:
Re: Extracting database into spreadsheet format?
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.
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.
-
- Second Line
- Posts: 656
- Joined: Sat Jan 07, 2012 11:21 pm
Re: Extracting database into spreadsheet format?
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.

No worries about my motives, just an EHM obsessed hockey fan.
- archibalduk
- TBL Admin Team
- Posts: 20373
- Joined: Tue Jul 06, 2004 8:44 pm
- Custom Rank: Seaside + Fruit Juice Mode
- Favourite Team: Guildford (EPL) / Invicta (NIHL)
- Location: United Kingdom
- Contact:
Re: Extracting database into spreadsheet format?
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!
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!
- nino33
- Mr. Goalie
- Posts: 6088
- Joined: Sat Aug 07, 2010 3:37 am
- Custom Rank: Retro Rosters Specialist
- Favourite Team: 1970s hockey
Re: Extracting database into spreadsheet format?
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
My apologies for my mistake...I'm glad I was wrong!BKarchitect wrote:Thanks archi...don't have any experience with C++ but I will give it a go
Good luck to you in your efforts BKarchitect!
- YZG
- Second Line
- Posts: 682
- Joined: Mon Aug 16, 2010 11:17 pm
- Custom Rank: DHM Head Researcher
- Location: Canada
Re: Extracting database into spreadsheet format?
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
- YZG
- nino33
- Mr. Goalie
- Posts: 6088
- Joined: Sat Aug 07, 2010 3:37 am
- Custom Rank: Retro Rosters Specialist
- Favourite Team: 1970s hockey
Re: Extracting database into spreadsheet format?
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!)YZG wrote:Shall we conclude that the opposite is equally true? Can one convert a .csv file into a .dat file
- archibalduk
- TBL Admin Team
- Posts: 20373
- Joined: Tue Jul 06, 2004 8:44 pm
- Custom Rank: Seaside + Fruit Juice Mode
- Favourite Team: Guildford (EPL) / Invicta (NIHL)
- Location: United Kingdom
- Contact:
Re: Extracting database into spreadsheet format?
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).
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).
- YZG
- Second Line
- Posts: 682
- Joined: Mon Aug 16, 2010 11:17 pm
- Custom Rank: DHM Head Researcher
- Location: Canada
Re: Extracting database into spreadsheet format?
Awesome. Where was I when it became common knowledge?? Can't believe I missed that! I'll have to try it someday.
- YZG
- YZG
- archibalduk
- TBL Admin Team
- Posts: 20373
- Joined: Tue Jul 06, 2004 8:44 pm
- Custom Rank: Seaside + Fruit Juice Mode
- Favourite Team: Guildford (EPL) / Invicta (NIHL)
- Location: United Kingdom
- Contact:
Re: Extracting database into spreadsheet format?
To be fair, you've probably been too busy running the Dabo research to notice this previously!! 
