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, Excel2Wiki
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.) 4. Open the website, Excel2Wiki. 5. Paste in the copied data from the Excel file in the large box on the page. 6. There are six options you should review before completing the process: 7. Once you have clicked the options you want, then click on the Convert blue 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.
 * Format first row as header: Click this box if the first row of your table contain headers and is not data; the box is defaulted to be checked
 * Use class="wikitable": Click this box to add the appropriate class for the table. The box is defaulted to be checked; if checked, it gives the additional options of collapsible and sortable; it is recommended that you leave it checked
 * Collapsible: Click this box if you wish to have the option to make the table collapsible
 * If this item is checked, two additional options appear and you must choose one:
 * Collapsed: This means the table will have the option to make a collapsible table using the words, hide and show; for more information
 * Autocollapsed: This option states that if there is more than one collapse element on the table, it will cause it to collapse; for more information'''
 * Format first column as header: Click this box if the first column of your table contain headers and is not data
 * Use : If you click on this option, you do not want the options of making the table collapsible or 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.) 6. Open the website, CSV to Wikitext Converter.



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
Lets use this example to demonstrate:
 * 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.

Here is the wikitext coding for this table as might be generated by the spreadsheet conversion program. To add any styling to individual cells, you enter it between the double pipes and the data in the cell. Here's how:
 * The coding class="wikitable" is not generated by the program, you have to add it.

Here is what it looks like: Here is what it looks like:
 * Notice that you have to add an additional pipe to separate the coding from the data in the cell.
 * If you want to have all the cells with the same style, then add coding to the row tag "|-".
 * For additional help with styling for Wikitext tables click here.