Import Spread Sheet to GEDitCOM II Extension

Sometimes you obtain genealogy data in spread sheets or plain text files. One way to get such data into GEDitCOM II is to manually enter everything. But if the file is large, that approach is tedious. This extensions provides an alternative. If you can reformat the data into a spread sheet as explained below, this extension will import all the data in one command.

Import Data for Individuals

The first task is to import data for many individuals. The task of linking them in family records is discussed below. The process is:

  1. Create a spread sheet document using any convenient software (e.g., Excel or Numbers, but see details on these or others below)
  2. The first row of the spread sheet must be column headers. Each cell in that row must list GEDCOM tags corresponding to the data in that column. Some examples are NAME, SEX, BIRT.DATE, BIRT.PLAC, etc. In other words, give the GEDCOM tag for level 1 data or give tags connected by periods for level 2 or higher data.
  3. The column header tags must be unique meaning you cannot, for example, import two census events by having two columns labeled "CENS". The second one will overwrite the first one.
  4. Each subsequent row of the spread sheet will have data for one individual. Fill in columns with known data and leave others blank.
  5. When done, save the file as either a tab-delimited text file (a ".txt" file) or as a comma-separated-values file (a ".csv" file). See more details below.
  6. Run this extension to import all individuals, but if you want family links too, see the the next two sections before importing the individuals.

Creating Family Links

Creating family linkages from text data is much harder (which is one reason people use genealogy software). But this extension can do it if the data are set up according to the following rules.

The first family task is to link spouses:

  1. Add a column labeled "FAMS.spse". For each person that has a spouse, enter the line number in the spread sheet for their spouse (Excel and Numbers display line numbers to help in this step). In this numbering, the line of column headers is line 1 and the individuals begin on line 2.
  2. Add a column for "SEX" before the "FAMS.spse", which is needed to correctly assign spouses as husbands or wives in family records. This column should have "M" or "F" for each individual.
  3. To create a same-sex couple, simply link two individuals with the same sex in the "FAMS.spse" column.
  4. To have a single spouse family (i.e., family where one spouse is unknown), enter "0" in the "FAMS.spse" column of the one known spouse.
  5. To enter additional information about these families, add columns with data for the family record such as "FAMS.MARR.DATE" and "FAMS.MARR.PLAC" for marriage data and place. These data only need to be in the row for one of the spouses and must come after the "FAMS.spse" column.
  6. Run this extension to import all individuals and create all needed family records to link entered spouses, but if you want to link children too, see the next section before importing

The second family task is to link children to their parents:

  1. Add a column labeled "FAMC".
  2. For each person with known parents, enter the line number in the spread sheet for either one of their parents. In this numbering, the line of column headers is line 1 and the individuals begin on line 2.
  3. Run this extension to import individuals and all entered family links.

Spread Sheet Preparation Details

You can prepare the spread sheet for importing with any spread sheet software or even any text editor. The two most common spread sheet applications for Mac users are Excel and Numbers. Both of these applications have idiosyncracies that complicated importing, but it this extension was revised to support them. You can probably use other applications as well. Here are some details:

Excel

  1. Open your data in a single-sheet spread sheet document and edit all data as explained above.
  2. When done, choose "Save As..." and save the file as a "Tab-Delimited File".
  3. You can import that saved file.

Excel's indiosyncracies are that the saved file puts quotes around many cells (which is not necessary in tab-delimited files) and it uses Mac line ending characters from the 1990's (I geuss Microsoft has not noticed yet that Apple switched to MacOS X more than a decade ago). To solve these problems, this extension will remove quotes and will look for out-of-date line endings. The only consequence of quotes will be that if you put your own quotes in cells, they might be removed too. Fortunately, this should be very uncommon for imported data, except maybe for a NOTE tag.

Another issue with Excel is limited support for unicode text. If you need names or places with characters not available in Excel, you will need to switch to other software.

Numbers

  1. Open your data in a single-sheet spread sheet document and edit all data as explained above.
  2. When done, choose "ExportÉ" and export as a comma-separated-values, or ".csv" file.
  3. You can import that saved file.

Numbers' indosyncracies are that it cannot export tab-delimited files (which are very common for data base uses and should be supportted) and that it uses Windows line endings in the file (Apple must think no Mac user would every want a ".csv" file?). This extension was written to watch our for Windows line ending characters and to allow use of ".csv" files.

When using ".csv" files, cell that contain commas have the be quoted. This extension looks for and removes those quotes. As a consequence, if you use quotes in cells, they could disrupt the import. Fortunately quotes should be very uncommon for imported data, except maybe for a NOTE tag. Furthermore, even if you use them, you should be OK as long as all your quotes are in matched pairs.

Another Numbers indiosynracy is that the export to ".csv" file exports all cells including empty columns and rows beyond the last row and column with data. This extension will ignore those empty cells, but the import will be more efficient if you delete unneeded rows and columns before exporting the ".csv" file.

Other Spread Sheet Software

Most other spread sheet options should work as well. The only requirement is that the application allows you two save the data as either a tab-delimited file or a comma-separated-values file. Furthermore, those files hopefully will not have some neew idiosyncracies that disrup the import.

Plain Text Editors

You can even prepare data in any text editor (e.g., Apple's TextEdit, BBEdit, MS Word, or Pages). In text editing tools, you directly separate columns by tabs or commas (but not both in the same document). When doing family links, you will need some method to find the line numbers for spouses or parents. When done save as a plain text file and the import using this extension.

Hint: If quote marks are in issue in Excel or Numbers, one way to avoid that problem is to prepare the document in Excel or Numbers, but when ready to save, copy and paste all cells into a plain text document (e.g., in Apple's TextEdit or BBEdit) and save from that application rather than from Excel or Numbers.