Do you want to convert a GEDCOM file into a spreadsheet with every person in your family tree in a row with their birth and death details?
This tutorial walks through how to do this for free. You’ll be working with a script or piece of code, but don’t worry if you’re not familiar with programming.
I’ll provide the script in a way that you only need to change one line to tell it where to find your GEDCOM file.
Then follow my instructions to run the amended script and download a CSV file you can import into Microsoft Excel, Google Sheets, or other spreadsheet applications.
If it all seems too daunting, we have a super-cheap service that will run the conversion for you so you don’t need to do any of the code bits. Follow this link to convert your GEDCOM into a CSV file and an Excel spreadsheet. Two downloads for one dollar!
What The Spreadsheet Looks Like
This picture has most of the columns (I used a GEDCOM of fictitious names).

I like to include the parents with each person. Of course, the parents get their own entry in the spreadsheet too.
I find that the extra info helps with my Irish heritage. My spreadsheet is full of very similar names born in the same year and in the same village!
If you’ve ever looked inside a GEDCOM file, you’ll know that each person is assigned a unique identifier that looks like a long number.
The spreadsheet also includes those IDs – but they’re just out of the picture above).
Python – But Really Simple
I often use Excel macros to work with data. But I couldn’t get a macro to cope with converting the GEDCOM data format to a spreadsheet.
So, I built a Python package that does the conversion.
If you don’t know what Python is – it’s a programming language. But don’t worry if you’ve never encountered Python or have no background with programming.
I walk you through using a Google website with three simple lines of code you can copy-and-paste from here.
That means you don’t need to install Python or anything else on your local machine.
Step 1: Get Your GEDCOM File
You need to export your family tree to a GEDCOM file.
If your tree is on Ancestry or MyHeritage, here are links to tutorials to do that.
Step 2: Log Into Google Colab
Google Colab is a website and service from Google that lets you run Python scripts on the Google servers.
Follow this link to access the site.
It’s free. But you do need to have a free Google account to access the service.
If you have a Gmail account or use Google Sheets, then you already have one. If you don’t, the site will take you through the process of creating one when you try to sign in.
Click on the “Sign in” link (top right) to access Colab and use your Google account details.

The default Colab page may seem very busy. Ignore everything except the sign-in button at this point.
Step 3: Create A New Notebook
A pop-up screen will appear. Ignore everything and click on the blue “New notebook” link at the bottom right of the screen.

Think of a notebook as a project area for your work.
Step 4: Upload Your GEDCOM File To The Notebook
The notebook has a files area where we can upload our GEDCOM.
- Click on the files icon on the left of the screen.
It’s kinda small, but I’ve marked it with a big red arrow in this picture:

- Click on the “sample_data” folder

Google Colab is for educational purposes and they provide sample data files to play with.
You can ignore all these. We are going to upload our own.
When you hover your mouse over the “sample_data” line, you will see an ellipsis (three vertical dots) appear to the right.
- Click the ellipsis beside the “sample_data” folder.

- Choose “Upload” from the drop-down menu (it’s the first option).

- Click “OK” on the warning message.
The warning message is telling you that the file you upload will be eventually deleted. For privacy reasons, that’s a good thing.
You don’t get a message telling you that the file has uploaded successfully. Depending on the size of your GEDCOM, it should be fast.
There were six files in the sample_data folder. You should simply see a seventh appear (in alphabetical order). It will be the only file with the “.ged” extension.
Mine is in the picture below.

Step 5: Install My Gedcom Package
This package does all the work for you. But you need to install it to use it.
Right now, you see a long white rectangular box on the screen. This is known as a “cell”. There is a “run” button to the left of the cell.
Place your cursor into the cell and copy or type this:
!pip install simple-gedcom
Yes, this starts with an exclamation mark.
When you have finished typing, click the run button to the left of the box.

The button should change to a spinning icon as the website goes to work for you.
It may take a few seconds to finish, but you should see this:

If you don’t see the above success message, you have most likely got a spelling mistake.
Step 6: Paste This Python Script Into a Cell
We now want a second code cell to type into.
There is a button below the top menu that gives us a new code cell. Click the button labeled “+ Code”.
This gives you a new cell. Copy these three lines into the cell:
from simple_gedcom import load_gedcom
gedcom = load_gedcom('data/tree.ged')
gedcom.save_person_list_to_csv()
Step 7: Change One Line Of The Script
You only have to change one line of code.
That is the second line. The picture below has a big red arrow pointing to it:

This line tells Google Colab where to find your GEDCOM script.
Remember, you have already uploaded it to the sample_data folder.
File paths can be tricky so we are going to let Google Colab tell us the exact details to use.
If the file area is collapsed then click on the File icon again to show the files.
Click into the sample_data folder and hover your cursor over your GEDCOM file. You want to see the ellipsis (three dots) appear beside the file.
Click on the ellipsis and choose “Copy path” from the dropdown menu.

Now, replace what’s inside the quotation marks (‘data/tree.ged’) with what you’ve copied. Be sure not to remove the quotation marks.
My GEDCOM file is named “Family Tree.ged” and the amendment looks like this:
input_file = ‘/content/sample_data/Family Tree.ged’
Notice that the slashes are going forward. That’s just the way it is!
Step 8: Run The Script
Now for the moment of truth.
Click the run button for this cell (it’s to the left of the top line of the script).
Scroll down to the end and watch the output window.
You should see some names appearing.
If you see an error message, you’ve most likely made a mistake with copying the file path. Did you erase one of the quotation marks?
One drawback with Google Colab is that it’s not always clear when the script has finished processing.
Take a look at the very bottom of the screen. You should see a tiny green tick and some text saying the code has completed.
But the real proof is the appearance of the spreadsheet in the sample_data folder.
You should see an extra file with the extension “.csv” in the folder.
The spreadsheet has the same name as your GEDCOM, but with the csv extension. It should be listed right next to your GEDCOM file.
Step 9: Download The CSV File
- Hover over the csv file in the sample_data folder and click the ellipsis.
- Choose the “Download” option.
- Use the pop-up window to choose where you save the file.
If you use Microsoft Excel, then you’re all set. Open your new spreadsheet in Excel and away you go.
Step 10: Optional – Upload To Google Sheets
To upload a CSV file to Google Sheets, follow these steps:
- Create a blank spreadsheet
- Expand the File menu and choose “Import”.
- Use the Upload tab and find your file.
- Click the “Import data” green button.
Our “Done-For-You” Service
We have an online service that converts your GEDCOM into a CSV file and an Excel spreadsheet. Two downloads for one dollar!
There are some other great tools for you to check out too.
Thank you for your thorough instructions. Worked perfectly
great to hear!
Thank you for this. This was so easy to do. When I first read the instructions and listened to your you tube video, I thought to myself there is no way I’m going to do all that. It took less than 2 mins from start to finish. I would have liked the extras but I don’t use PayPal.
p.s. can you pretty please do a leads method one for Mac
It’s a relief to hear that people can follow it!
About the Mac – I don’t have Apple scripting knowledge so I wouldn’t do one for Numbers. But I have been tinkering with a version in Google Sheets which presumably Mac users could access. I’ll update the newsletter if I can get it working!
Thank you for the feedback about PayPal. I’ll probably change how I word that in the offer – because people can pay with all kinds of methods (e.g. credit/debit card) via PayPal. It’s just that using them means that my website doesn’t have to hold customer payment details, which is better for everybody!
Anyway, I’ll be showing how to get the word cloud in future, that should be even easier to run once you’ve used Colab once!
Thank you for your reply. Google sheets leads method would be fantastic xx
Linda
Hello Margaret,
I am delighted to see an easy method to parse a GedCom file compared to the method I used to use. Thank you very much.
I tried to add the code to get marriage data but got an error ” NameError: name ‘marriage_date’ is not defined”
In the try section I added:
marriage_date, marriage_place, marriage_sources = element.get_marriage_data()
And the area showing the error is:
96 worksheet.write(person_count, 13, gender)
97
—> 98 worksheet.write(person_count, 14, marriage_date)
99 worksheet.write(person_count, 15, marriage_place)
100
It would seem I don’t have the correct syntax for marriage or it is not coded into the parser.
Possibly burial date and place suffers the same issue.
Any suggestions please
What other data does the parser handle?
Eric
Hi Eric, you can get the documentation here on PyPi.
If you search for “gedcom” on the PyPi site, you’ll see some alternatives. But I saw a blog post from someone else using the basics of this package, so I ran with it.
Marriages aren’t part of the INDI element, but you can retrieve them by passing it to the parser within the loop. This returns a list for me on a small test:
marriages = gedcom_parser.get_marriages(element)
In contrast, burial and census data are part of the element. So, the call would be like this:
burial_data = element.get_burial_data()
I realize that I explained more about the package and documentation in the video than in this article. I’m about to put an extra paragraph in the article so people can go look at the package (and to make clear that I didn’t write it!)
I’ve tried many variations to get the marriage code to work:
marriage_date, marriage_place = gedcom_parser.get_marriages(element)
Would you explain where it should go and what is the syntax for the date and place.
Not every individual is married and the marriage data is under the FRIN tag in the GedCom.
Thanks for your help
I added a marriage to a tiny sample tree in Ancestry.com and the exported GEDCOM section looks like below i.e. the details are under a MARR tag. I’ll send you an email tomorrow with the sample GEDCOM and the script with the extra lines.
1 MARR
2 DATE 1853
2 PLAC GA
Hi Eric – I sent an email to the address I see behind this comment (it starts with joseph).
Margaret, would it be possible for me to get the script eith the marriage data as well? THanks
Hi Margaret, Great work, thanks. It ran my Ancestry.ged file successfully, but I’m having no success with Myheritage.ged file. Yes, the file path is correct but it is generating a couple of decode errors. Unfortunately I have no experience to interpret these. Am happy for you to process if possible so I have uploaded it. More than happy to pay your very reasonable charge. – thanks.
Interesting about MyHeritage, I haven’t experienced a problem with their ged files yet.
I saw your file come in, I’ll run it through the processing and examine for any structural issues.
I expect I can fix issues. If I can’t, there’ll be no charge.
I’m not able to download your gedcom.py Any suggestions?
I sent a copy of the script to your email. Also I had a few questions in the email to try and trouble-shoot – thanks for alerting me to a problem.
Very interesting, plus excellent demo – thank you!
I was surprised just how quickly the new xlsx file was generated considering I have almost 6,000 entries.
I did at first think it very strange, that the initial results seem almost completely ‘Last Name’ alpha-sorted, but with very few exceptions. Then I realised it was sorted on the 1st ‘pointer’ column. I guess only MyHeritage would understand why only that few seem misplaced?
Thank you for the feedback about the timing. My own GEDCOM has under 1K entries so it’s great to hear results with a much larger file.
The full list is based on stepping through the GEDCOM file, line by line. So the order is based on how MyHeritage prepares and exports the file. So, you’re right – I can’t even speculate!
Hi,
I have signed up for the newsletter, but I am not getting the python script.
Please help!
Since there seems to be problems with the newsletter thingy, perhaps you could consider sharing it anyway and letting people sign up if they really want to? Just a thought… 🙂
Would it be possible for you to send me the script?
I sent that to your email address.
Great script, thank you.
Is it possible to parse Burial_Notes at all?
Yes, the python-gedcom package has a function called “get_burial_data”. I haven’t used it myself, but it sounds like what you want.
Is this reversable ie can the file produced be converted back to a gedcom
that at some future date could be uploaded to MyHeritage Findmypast Ancestry etc?
No, not this process. And I haven’t seen a tool out there that can go from spreadsheet to GEDCOM.
Hello! Thank you for this wonderful and easy-to-follow video! Is it possible to pull in “lived in” data (date and location)? I’d like to be able to filter people who might’ve lived in the same area at the same time.
Unfortunately not with this package.
Thank you for this nice script,
Totally new at this…
The only issue I am having is that the Date format from the gedcom is not a standard date format that excel can use?
I am having to try and have to do some formatting in excel
d month yyyy
dd january 1900
abt 1800
or blank…
..
not sure this can be fixed easily… just mentioning for future concern..
I wanted to be able to sort by birth or death dates..
Thank you again,
thanks for pointing this out
This was very useful and easy to follow. Can you tell me how to add the generation number for each individual? As well as other data, like immigration and marriage?
The package used in the script doesn’t provide the generation number. However, it can provide marriage details. There are various functions, like get_marriages(), however I haven’t used them.
Fantastic, worked well on my Mac. Thanks very much for taking the hard steps out for us
Hi Margaret,
Did you ever do a tutorial using just python locally? I can’t seem to find it. Also, is it possible to get all of the sources attached to a specific person?
Thanks!
Good point about using Python locally – I decided it was too technical for non-programmers.
The package I use doesn’t get sources, unfortunately.
works beautifully, thank you. One thing I would love to be able to parse would be include a field for adopted and step parents, and to populate those fields if a given family member has adopted or step-parents. Any ideas of how to achieve this?
Unfortunately, the package that I use doesn’t access the adopted/step-parents status.
Okay. Sad face. But thanks for reply.
Hi Margaret,
this looks like a great item but I’m unable to get the script you provide although I’ve tried subscribing a couple of times.
After I hit subscribe, a page spawns under this website but
https://assets.mailerlite.com/jsonp/341335/forms/82120070337135677/subscribe
there’s no script there.
thanks,
jai
Thank you for alerting me to this issue. I’ve separately emailed you a copy of the script so you’re not stuck.
Excellent work. The instructions were clear and the program functioned great. I note that my .ged must has first and middle names in once cell. I should be able to fix that in excel without too much trouble. Thanks
Terrific function, but I’m unable to get the script! Is if still available?
I’ve put a second way to get the file in the article. Here is a link – just enter a zero amount to download the file for free.
Hi, Margaret. Have you considered creating a chatgpt version of this converter? It looks like you have the background to do it, and it would bring a lot of LLM power to the genealogy community. Thanks for considering.
Thank you for the feedback. I must explore this but the main challenge is finding time!
Hello Margaret. Have you deleted the script file. It is unavailable.
Could you provide it to my mail. thanks.
Just wonder if you continue the page “gedcom-to-spreadsheet”? I can’t view the page as it came back to original page.
Thank you.