And untill "the gods" come up with something better, then we have to make do with what we have.
The easiest way i have come across to date is by using a converter.
So here is an idiots guide. Written by an idiot.
1 Generate your excell file
eg:-

Get the excell converter loaded.
to do this, whilst on your excell sheet hit ALT and F8
you will get a pop up like this.
stick something in the macroname box (anything will do)
Create should now highlight. hit it
the box will expand.
remove the:
Next, copy and paste from the code in the box below, when you hit "show me the code"
Code
Option Explicit
Public Sub ExcelToWikidot()
'
'ExcelToWikidot
'Version 2.1.007 du 04/11/2007
'Author gerdami
'Credits:
' McGimpsey and Associates, for the idea: http://www.mcgimpsey.com/excel/udfs/multicat.html
' David McRitchie, for the colors: http://www.mvps.org/dmcritchie/excel/colors.htm#hexconv
' John Walkenbach, for the split function: http://j-walk.com/ss/excel/tips/tip93.htm
' Chip Pearson, for the Conditional Formatting Colors: http://www.cpearson.com/excel/CFColors.htm
Dim aRange, rCell As Range
Dim nRows, nCols, i, j, x As Long
Dim sAlign, sBackgroundColor, sCell, sWdLf, xColor As String
Dim xString As Variant
sWdLf = " _"
'sWdLf = " _" & vbLf
Set aRange = Selection.CurrentRegion
nRows = aRange.Rows.Count
nCols = aRange.Columns.Count
'Sheets.Add.Name = "Wikidot" ... test whether Wikidot sheet exists and delete TODO !
Sheets.Add
ActiveCell.Value = "[[table style=""width: 100%; border-collapse: collapse; border:2px solid""]]"
'ActiveCell.Value = "[[table]]"
ActiveCell.Offset(1, 0).Activate
For i = 1 To nRows
ActiveCell.Value = "[[row]]"
ActiveCell.Offset(1, 0).Activate
For j = 1 To nCols
Set rCell = aRange.Cells(i, j)
sCell = Trim(aRange.Cells(i, j).Text) 'remove spaces before and after text
sCell = Application.WorksheetFunction.Substitute(sCell, vbLf, sWdLf) 'replace char(010) by " _"
'ActiveCell.Value = ActiveCell.Value & "[[cell]]"
'[[cell style is build piece by piece
ActiveCell.Value = ActiveCell.Value & "[[cell style=""border:1px solid silver; "
Select Case rCell.HorizontalAlignment
Case Is = xlGeneral
sAlign = ""
Case Is = xlCenter
sAlign = "text-align: center; "
Case Is = xlLeft
sAlign = "text-align: left; "
Case Is = xlRight
sAlign = "text-align: right; "
End Select
ActiveCell.Value = ActiveCell.Value & sAlign
' background-color
' xColor = Right("000000" & Hex(rCell.Interior.Color), 6) 'David Mc
' xColor = Right("000000" & Hex(ColorOfCF(rCell, 0)), 6) 'Chip Pearson
xColor = Right("000000" & Hex(ConditionalColor(rCell, "interior")), 6) '
xColor = "#" & Right(xColor, 2) & Mid(xColor, 3, 2) & Left(xColor, 2)
If xColor <> "#FFFFFF" Then
sBackgroundColor = " background-color: " & xColor & ";"
Else
sBackgroundColor = ""
End If
ActiveCell.Value = ActiveCell.Value & sBackgroundColor
ActiveCell.Value = ActiveCell.Value & """]]"
If Len(sCell) > 0 Then 'Wikidot does not like empty cells: v2.1.007
'cell emphasis is applied piece by piece
If rCell.Font.Bold = True Then sCell = "**" & sCell & "**"
If rCell.Font.Italic = True Then sCell = "//" & sCell & "//"
If rCell.Font.Strikethrough = True Then sCell = "--" & sCell & "--"
If rCell.Font.Superscript = True Then sCell = "^^" & sCell & "^^"
If rCell.Font.Subscript = True Then sCell = ",," & sCell & ",,"
If rCell.Font.Underline = xlUnderlineStyleNone Then Else sCell = "__" & sCell & "__"
' font colors
' http://www.mvps.org/dmcritchie/excel/colors.htm#hexconv
' xColor = Right("000000" & Hex(rCell.Font.Color), 6)
' http://www.cpearson.com/excel/CFColors.htm
' xColor = Right("000000" & Hex(ColorOfCF(rCell, 1)), 6)
xColor = Right("000000" & Hex(ConditionalColor(rCell, "font")), 6)
xColor = "#" & Right(xColor, 2) & Mid(xColor, 3, 2) & Left(xColor, 2)
If xColor <> "#000000" Then sCell = "#" & xColor & "|" & sCell & "##"
ActiveCell.Value = ActiveCell.Value & sCell
Else ' Len(sCell) = zero then nothing
End If
ActiveCell.Value = ActiveCell.Value & "[[/cell]]"
' With the above I have all cells in one row, with the split function,
' I will split the cells containing the Wikidot linefeed " _"
' http://j-walk.com/ss/excel/tips/tip93.htm
xString = Split(ActiveCell.Text, sWdLf)
For x = 0 To UBound(xString)
ActiveCell.Value = xString(x)
If x <> UBound(xString) Then ActiveCell.Value = ActiveCell.Value & sWdLf
ActiveCell.Offset(1, 0).Activate
' I have currently a side effect: one cell per line
' but I will keep it for readibility
Next x
Next j
'ActiveCell.Offset(1, 0).Activate
ActiveCell.Value = "[[/row]]"
ActiveCell.Offset(1, 0).Activate
Next i
ActiveCell.Value = "[[/table]]"
Selection.CurrentRegion.Select
End Sub
'''''''''''''''''''''''''''''''''
Function ConditionalColor(rg As Range, FormatType As String) As Long
'http://www.vbaexpress.com/kb/getarticle.php?kb_id=190
'Returns the color (either font or interior) of the first cell in range rg. If no _
conditional format conditions apply, then returns the regular color of the cell. _
FormatType is either "Font" or "Interior"
Dim cel As Range
Dim tmp As Variant
Dim boo As Boolean
Dim frmla As String, frmlaR1C1 As String, frmlaA1 As String
Dim i As Long
' Application.Volatile 'This statement required if Conditional Formatting for rg is determined by the _
value of other cells
Set cel = rg.Cells(1, 1)
Select Case Left(LCase(FormatType), 1)
Case "f" 'Font color
ConditionalColor = cel.Font.Color
Case Else 'Interior or highlight color
ConditionalColor = cel.Interior.Color
End Select
If cel.FormatConditions.Count > 0 Then
'On Error Resume Next
With cel.FormatConditions
For i = 1 To .Count 'Loop through the three possible format conditions for each cell
frmla = .Item(i).Formula1
If Left(frmla, 1) = "=" Then 'If "Formula Is", then evaluate if it is True
'Conditional Formatting is interpreted relative to the active cell. _
This cause the wrong results if the formula isn't restated relative to the cell containing the _
Conditional Formatting--hence the workaround using ConvertFormula twice in a row. _
If the function were not called using a worksheet formula, you could just activate the cell instead.
frmlaR1C1 = Application.ConvertFormula(frmla, xlA1, xlR1C1, , ActiveCell)
frmlaA1 = Application.ConvertFormula(frmlaR1C1, xlR1C1, xlA1, xlAbsolute, cel)
boo = Application.Evaluate(frmlaA1)
Else 'If "Value Is", then identify the type of comparison operator and build comparison formula
Select Case .Item(i).Operator
Case xlEqual ' = x
frmla = cel & "=" & .Item(i).Formula1
Case xlNotEqual ' <> x
frmla = cel & "<>" & .Item(i).Formula1
Case xlBetween 'x <= cel <= y
frmla = "AND(" & .Item(i).Formula1 & "<=" & cel & "," & cel & "<=" & .Item(i).Formula2 & ")"
Case xlNotBetween 'x > cel or cel > y
frmla = "OR(" & .Item(i).Formula1 & ">" & cel & "," & cel & ">" & .Item(i).Formula2 & ")"
Case xlLess ' < x
frmla = cel & "<" & .Item(i).Formula1
Case xlLessEqual ' <= x
frmla = cel & "<=" & .Item(i).Formula1
Case xlGreater ' > x
frmla = cel & ">" & .Item(i).Formula1
Case xlGreaterEqual ' >= x
frmla = cel & ">=" & .Item(i).Formula1
End Select
boo = Application.Evaluate(frmla) 'Evaluate the "Value Is" comparison formula
End If
If boo Then 'If this Format Condition is satisfied
On Error Resume Next
Select Case Left(LCase(FormatType), 1)
Case "f" 'Font color
tmp = .Item(i).Font.Color
Case Else 'Interior or highlight color
tmp = .Item(i).Interior.Color
End Select
If Err = 0 Then ConditionalColor = tmp
Err.Clear
On Error GoTo 0
Exit For 'Since Format Condition is satisfied, exit the inner loop
End If
Next i
End With
End If
End Function
Then Hit ALT and F4
which will return you to you sheet
Make the table pretty
eg:
select the whole table
then Hit Alt F8
which will give you
Hit RUN
A new sheet will appear with a load of horrid yukky code in column A.
Copy that code
And PASTE it into your wiki page.
And low and behold, you should get something like
|
t1 |
t2 |
t3 |
t4 |
| john |
1 |
2 |
3 |
4 |
| paul |
5 |
6 |
7 |
8 |
| ringo |
9 |
a |
b |
c |
| george |
d |
e |
f |
g |
Spanners in the workscan be caused by
- Not selecting the whole table
- Blank lines
- trying to do two differnt "styles" of tables on the same sheet.
- other things that i haven't fully determined…. yet.
Have fun