User:Gloverepp/Using Excel for Wiki

From Wikipedia, the free encyclopedia
This picture is worth a 1000 words. The picture has fewer records than the example below.

Please put your suggestions or comments on the Discussion page. thanks, enjoy GloverEpp (talk) 13:58, 22 April 2010 (UTC)

Here's how I use Excel to create wiki pages. The bottom line is that I use html instead of the wiki technique of using |- to separate each line. This way, I can sort within Excel and not have to worry about all those |- empty lines.

Steps.

  1. Build whatever you want in Excel. BUT, use <tr> instead of |-in the first column and <td> or <th> instead of || to separate the fields. I think the example will help show this.
  2. Copy your Excel cells into your clipboard.
  3. Paste them into the input box here to remove extra whitespace. Click the Replace Whitespaces button.
  4. Copy results into Notepad from the above step for further cleansing, if need be. In my case, I had tons of empty [[]], so I removed them in Notepad.
  5. Copy the results from Notepad into a wiki page. This all sounds like such a cluge, but it works really well.

Sample[edit]

Looks like this as copied out of Excel[edit]

There are tons of white space that you can see if you edit this. I chose to remove it instead of passing it on to wiki. Also, in Excel, each line is begun with the html <tr> which is not obvious when you look at this presentation.

{| class="wikitable sortable" border="1" |- <tr><th> Simple name <th> Waterway (Canal or River)<br>Ref.<br> <th> Also Known As<br> <th> Connected to body of water at one end<br> <th> Near City<br> <th> Connected to body of water at other end<br> <th> Near City<br> <tr><td> Aa <td> [[Aa (France)|Aa River]] <td>[[ ]]<td>[[ ]]<td>[[ Watten, Nord|Watten ]]<td>[[ North Sea ]]<td>[[ Gravelines ]] <tr><td> Adour <td> [[Adour River]] <td>[[ ]]<td>[[ ]]<td>[[ Dax, Landes|Dax ]]<td>[[ ]]<td>[[ Anglet ]] <tr><td> Aff <td> [[Aff River|Aff River]] <td>[[ L'Aff ]]<td>[[ ]]<td>[[ Glenac ]]<td>[[ ]]<td>[[ La Gacilly ]] <tr><td> Aire <td> [[Canal d'Aire]] <td>[[ ]]<td>[[ Canal de la Deûle ]]<td>[[ Bauvin ]]<td>[[ Canal de Neufossé ]]<td>[[ Aire-sur-la-Lys ]] <tr><td> Aisne <td> [[Aisne_(river)|Aisne River]] <td>[[ ]]<td>[[ ]]<td>[[ Compiègne ]]<td>[[ ]]<td>[[ Vailly-sur-Aisne ]] <tr><td> Aisne <td> [[Canal latéral à l'Aisne]] <td>[[ Aisne Canal ]]<td>[[ Aisne (river)|Aisne ]]<td>[[ Celles-sur-Aisne ]]<td>[[ Canal des Ardennes ]]<td>[[ Vieux-lès-Asfeld ]] <tr><td> Aisne <td> [[Canal de l'Aisne à la Marne]] <td>[[ Aisne-Marne Canal ]]<td>[[ Canal latéral à l'Aisne ]]<td>[[ Berry-au-Bac ]]<td>[[ Canal latéral à la Marne ]]<td>[[ Condé-sur-Marne ]] <tr><td> Alsace <td> [[Grand Canal d'Alsace]] <td>[[ Grand Canal of Alsace ]]<td>[[ ]]<td>[[ Huningue ]]<td>[[ ]]<td>[[ Lauterbourg ]] |}

Looks like this after processing with this and removing any [[]] with notepad[edit]

{| class="wikitable sortable" border="1" |- <tr><th>Simple name<th>Waterway (Canal or River)<br>Ref.<br><th>Also Known As<br><th>Connected to body of water at one end<br><th>Near City<br><th>Connected to body of water at other end<br><th>Near City<br> <tr><td>Aa<td>[[Aa (France)|Aa River]]<td><td><td>[[Watten, Nord|Watten]]<td>[[North Sea]]<td>[[Gravelines]] <tr><td>Adour<td>[[Adour River]]<td><td><td>[[Dax, Landes|Dax]]<td><td>[[Anglet]] <tr><td>Aff<td>[[Aff River|Aff River]]<td>[[L'Aff]]<td><td>[[Glenac]]<td><td>[[La Gacilly]] <tr><td>Aire<td>[[Canal d'Aire]]<td><td>[[Canal de la Deûle]]<td>[[Bauvin]]<td>[[Canal de Neufossé]]<td>[[Aire-sur-la-Lys]] <tr><td>Aisne<td>[[Aisne_(river)|Aisne River]]<td><td><td>[[Compiègne]]<td><td>[[Vailly-sur-Aisne]] <tr><td>Aisne<td>[[Canal latéral à l'Aisne]]<td>[[Aisne Canal]]<td>[[Aisne (river)|Aisne ]]<td>[[Celles-sur-Aisne]]<td>[[Canal des Ardennes]]<td>[[Vieux-lès-Asfeld]] <tr><td>Aisne<td>[[Canal de l'Aisne à la Marne]]<td>[[Aisne-Marne Canal]]<td>[[Canal latéral à l'Aisne ]]<td>[[Berry-au-Bac]]<td>[[Canal latéral à la Marne]]<td>[[Condé-sur-Marne]] <tr><td>Alsace<td>[[Grand Canal d'Alsace]]<td>[[Grand Canal of Alsace]]<td><td>[[Huningue]]<td><td>[[Lauterbourg]] |}

Looks like this in Wiki[edit]

Simple nameWaterway (Canal or River)
Ref.
Also Known As
Connected to body of water at one end
Near City
Connected to body of water at other end
Near City
AaAa RiverWattenNorth SeaGravelines
AdourAdour RiverDaxAnglet
AffAff RiverL'AffGlenacLa Gacilly
AireCanal d'AireCanal de la DeûleBauvinCanal de NeufosséAire-sur-la-Lys
AisneAisne RiverCompiègneVailly-sur-Aisne
AisneCanal latéral à l'AisneAisne CanalAisne Celles-sur-AisneCanal des ArdennesVieux-lès-Asfeld
AisneCanal de l'Aisne à la MarneAisne-Marne CanalCanal latéral à l'Aisne Berry-au-BacCanal latéral à la MarneCondé-sur-Marne
AlsaceGrand Canal d'AlsaceGrand Canal of AlsaceHuningueLauterbourg