Help:Copy Spreadsheets into the Wiki

Some contributors wish to import information from existing spreadsheets. This is especially helpful when trying to import tables, or keep current formatting from pre-existing or spreadsheets.

In addition, if you find creating tables in the Wiki to be a little confusing and difficult to work with, you might consider creating tables in such programs such as Excel and then import them into the Wiki.

How to copy a spreadsheet table into the Wiki

There are two ways to import a table. The first way is easiest. The second requires converting the Excel file to a CSV file. Choose the one you prefer.

Converting using program, tab2wiki

1. (On your computer:) Open the spreadsheet or Excel file you wish to copy to the FamilySearch Wiki.

2. With the file open, select all of the contents in the spreadsheet by left-clicking in the upper left-hand corner of the table you want to copy, and while holding down the left mouse button, drag the mouse until the text or table you wish to copy is entirely highlighted.

3. Release the left mouse button, and without clicking, position your cursor over the highlighted area. Now right-click on the highlighted area, and click "Copy" (or, while the mouse is positioned over the highlighted area, copy the highlighted text by holding down the "Ctrl" key while tapping the "C" key once.)

5. Paste in the copied data from the Excel file in the large box on the page.

6. There are four options you should review before completing the process:

First element in a column is a header - click this box if the first column of your table contain headers and is not data (the box is defaulted to be checked)

First element in a row is a header - click this box if the first row of your table contain headers and is not data

Compress table - click this box if you wish to compress the table (the box is defaulted to be checked)

Sortable table - click on this box if the Excel file was a sortable table (the box is defaulted to be checked)

7. Once you have clicked the options you want, then click on the Do it! button.

8. The program will create wikitext for the table you added.

9. Copy the wikitext found in the box by highlighting the information with your mouse, then holding down the "Ctrl" key and the "C" key once. (Or, left-click on the mouse and select, "Copy")

10. Return to the Wiki page you wish to put this Excel table and click on the tab, "Edit the source." Then, paste the information into the page. (Use the instructions above for pasting the information.)

11. Save the page so the information will remain on the page. The table will now appear but the table will need to be formatted. Use the instructions below to format the table.

12. NOTE: if you wanted the table sortable, it is suggested you replace the wikitext at the top of the table from {| border="1" class="sortable" to {| class="wikitable sortable"

Converting to a CSV file first

1. (On your computer:) Open the spreadsheet or Excel file you wish to copy to the FamilySearch Wiki.

2. You need to save your Excel file as a CSV (MS-DOS) file. Do this by selecting, Save As. Then, change the "type" from, Excel Workbook and change it to, CSV (MS-DOS). It's best to give it a new name so you don't get it confused with your original file that is an Excel file.

3. You may get the error while trying to save the document: Some features in your workbook might be lost if you save it as CSV (MS-DOS). Do you want to keep using that format? Click on the "Yes" button.

4. In the converted CSV file, select all of the contents in the spreadsheet by left-clicking in the upper left-hand corner of the table you want to copy, and while holding down the left mouse button, drag the mouse until the text or table you wish to copy is entirely highlighted.

5. Release the left mouse button, and without clicking, position your cursor over the highlighted area. Now right-click on the highlighted area, and click "Copy" (or, while the mouse is positioned over the highlighted area, copy the highlighted text by holding down the "Ctrl" key while tapping the "C" key once.)

7. If your table has a row of titles at the top, click on the box located at the top of the webpage, "The first row is the header"

8. On the left side of page, click in the box so the cursor shows. Then paste the information you copied from the CSV spreadsheet by doing a right-click on the mouse and chosing paste. (You can also hold down the "Ctrl" key and the "V" key once to paste the information.) Note: Sometimes it takes several tries before it recognizes your cursor to paste your information. Just keep playing with it.

9. Information you will need to paste into the Wiki should automatically appear in the right box. If it doesn't, try pressing "enter".

10. A preview of your table will appear below the two boxes. You can ignore this information.

11. Copy the wikitext found in the right box by double clicking on the box, then hold down the "Ctrl" key and the "C" key once. (Or, left-click on the mouse and select, "Copy")

12. Return to the Wiki page you wish to put this Excel table and click on the tab, "Edit the source." Then, paste the information into the page. (Use the instructions above for pasting the information.)

13. Save the page so the information will remain on the page. The table will now appear but the table will need to be formatted. Use the instructions below to format the table.

Adding Borders to the Table

To add borders to the table:

1. Click on the tab, "Edit source" and locate at the top of the table, "{|". Add the following code to create borders around each cell:
class="wikitable"

The wikitext on the line should look like this:
{| class="wikitable"

2. Save the page and you will now see borders around each cell.

More Styling to the Cells

As you look at the coding and you will notice two pipes ||.

These double pipes are required to separate the cells if they are in a row instead of separate lines.

It is between the double pipes and the data in the cell that you add the additional styling in Wikitext.

Lets use this example to demonstrate:

Cell one

Cell two

Cell three

Cell four

Here is the wikitext coding for this table as might be generated by the spreadsheet conversion program.

{| class="wikitable"
|-
|Cell one||Cell two||Cell three||Cell four
|}

The coding class="wikitable" is not generated by the program, you have to add it.

To add any styling to individual cells, you enter it between the double pipes and the data in the cell.
Here's how: