Every page related to viticulture that I have pretty much came from Excel, and uses a macro to convert into a format the Wiki recognizes. Doing this by hand is......insane.
This simple macro well export the area of a worksheet that is selected and will export it to a file. It will prompt you to enter a file and path name. Be sure that you name it .txt, because that's the easiest. Make sure you put it somewhere you can find it.
Then open the text file and copy the contents into the Wiki. You have to play with it a little bit, but I think you'll like it.
' Dimension all variables. Dim DestFile As String Dim FileNum As Integer Dim ColumnCount As Integer Dim RowCount As Integer
' Prompt user for destination file name. DestFile = InputBox("Enter the destination filename" _ & Chr(10) & "(with complete path):", "WikiExporter")
' Obtain next free file handle number. FileNum = FreeFile()
' Turn error checking off. On Error Resume Next
' Attempt to open destination file for output. Open DestFile For Output As #FileNum
' If an error occurs report it and end. If Err <> 0 Then MsgBox "Cannot open filename " & DestFile End End If
' Turn error checking on. On Error GoTo 0
' Loop for each row in selection. For RowCount = 1 To Selection.Rows.Count
' Loop for each column in selection. For ColumnCount = 1 To Selection.Columns.Count
' Write current cell's text to file with quotation marks. Print #FileNum, "|| " & Selection.Cells(RowCount, _ ColumnCount).Text & " ";
' Check if cell is in last column. If ColumnCount = Selection.Columns.Count Then ' If so, then write a blank line. Print #FileNum, "||" Else ' Otherwise, write a comma. 'Print #FileNum, "||"; End If ' Start next iteration of ColumnCount loop. Next ColumnCount ' Start next iteration of RowCount loop. Next RowCount
' Close destination file. Close #FileNumEnd Sub
Have you ever created an Excel Macro before?
To use the Macro
Name | Creator | Date | Size | Description |
---|---|---|---|---|
WikiMacro.xls | Isetnefret | January 28, 2007 10:42 pm | 30720 | Export Excel Pages to Wiki Format |
step11.gif | Isetnefret | January 28, 2007 11:16 pm | 12719 | step 11 |
step3.gif | Isetnefret | January 28, 2007 11:11 pm | 31548 | Step 3 |
step4.gif | Isetnefret | January 28, 2007 11:13 pm | 8585 | step 4 |
step5.gif | Isetnefret | January 28, 2007 11:14 pm | 2436 | step 5 |
step6.gif | Isetnefret | January 28, 2007 11:14 pm | 13224 | step 6 |
step8.gif | Isetnefret | January 28, 2007 11:16 pm | 16784 | step 8 |
step9.gif | Isetnefret | January 28, 2007 11:16 pm | 55149 | step 9 |
ustep1.gif | Isetnefret | January 28, 2007 11:16 pm | 2577 | Usage step 1 |
ustep3.gif | Isetnefret | January 28, 2007 11:17 pm | 10549 | Usage step 3 |
ustep4.gif | Isetnefret | January 28, 2007 11:17 pm | 12767 | Usage step 4 |