ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

News and Reviews > Mini-Reviews by Members

WikidPad - an IDE for your thoughts

<< < (8/8)

Perry Mowbray:
First new beta since January released last weekend...
-Ampa (July 28, 2008, 06:00 AM)
--- End quote ---

Thanks Ampa! Yes, I'm using WikidPad more and more, and it is somewhat slow, but if it stays slow and steady I'll be happy...

oversky:
How can I copy a table from excel into Wikidpad?

Perry Mowbray:
How can I copy a table from excel into Wikidpad?
-oversky (October 10, 2008, 04:48 PM)
--- End quote ---

Of course the table structure is quite different, eh?

In WikidPad I generally do:

--- ---<<|
Cell One:One | Cell One:Two
Cell Two:One | Cell Two:Two
>>
So all you'd need to do is to write some VBA to put your Excel cells into that format and put it on the clipboard ready for pasting into WikidPad.

At my last job I wrote a macro to do the same thing but formatted for Confluence, I'll see if I can dig it up...

Perry Mowbray:
OK, found it and made the few changes for WikidPad...

1. Copy the following code into the WorkBook Code.


--- Code: Visual Basic ---Sub SelectionToWiki()    Dim specialChars As String    specialChars = Chr(7) & Chr(10) & Chr(13) & "\"        result = ""    For i = 1 To Selection.Rows.Count        'result = result & "| "        For j = 1 To Selection.Columns.Count            Dim cell As Range            Set cell = Selection.Cells(i, j)            cellStr = cell.Value                        ' New Lines don't work in WikidPad Cells so            cellStr = Replace(cellStr, Chr(10), " / ")                        If cell.Font.Bold Then cellStr = "*" & cellStr & "*"            If cell.Font.Italic Then cellStr = "_" & cellStr & "_"            result = result & cellStr & " | "        Next        ' remove the last pipe        result = Left(result, Len(result) - 3)        ' add a line feed        result = result & Chr(13)    Next    ' wrap the table formatting    result = "<<|" & Chr(13) & result & ">>"        Dim MyDataObj As New DataObject    MyDataObj.SetText result    MyDataObj.putinclipboard        MsgBox "WikidPad table copied to clipboard: " & Chr(13) & Chr(13) & resultEnd Sub
2. Add a table to the WorkSheet:


3. Select the Range to copy

4. Run the Macro: Alt+F8 and select the Macro and click "Run"

5. Paste the clipboard into a WikidPad Page. It should look like this:

--- Code: HTML ---<<|*Heading Two* | *Heading Two* | *Heading Three*_Two :: Two_ | Two :: Two | Two :: ThreeTwo :: Two | Two :: Two | Two :: ThreeThree :: Two | Three :: Two | _Three :: Three_Four :: Two / Four :: Two: Line Two | Four :: Two / Four :: Two: Line Two | Four :: Three / Four :: Three: Line Two>>
6. Preview the page. It should look like this:

Navigation

[0] Message Index

[*] Previous page

Go to full version