| Name | Excel to Confluence Converter |
|---|---|
| Status | Beta |
| Version | 1.0 |
| Product Versions | Confluence 1.4+ |
| Author(s) | Phillip Bogle |
| Price | Free |
| Homepage | Excel to Confluence Converter |
| Issue Tracking | http://developer.atlassian.com/jira/browse/OFCE |
| Download Script | ExcelToConfluence.xls |
| This is a legacy plugin. A newer version is contained in the Microsoft Office Add-inbased on .Net 2.0. Unless you have a specific need for the script or using MS Office 2002 (XP) or below, we recommend you the Add In instead. |
Description
Convert simple Excel spreasheets into Confleunce tables.
Instructions
Attached, please find an Excel Macro which converts the current selection to the confluence table format. Documentation for how to use the macro is in the worksheet itself. The macro also handles simple bold and italic formatting.
Alternatives
- Excel Plugin provides for dynamic views of Excel data.

Comments (25)
Feb 09, 2005
P. damron says:
I opened your spreadsheet, then opened the one I wanted to convert. I see the 'C...I opened your spreadsheet, then opened the one I wanted to convert. I see the 'Copy to Confluence' button on the menu and when I highlight the cells I want to convert and then click the button, I get an error message: 'ExcelToConfluence.xls' could not be found. Check the spelling of the name...' etc. Is this a bug in your macro, or is it operator error ? Thanks...P.Damron
Jul 11, 2005
Nithi Vivatrat says:
This worked great. Thanks for writing this script. To the previous comment R...This worked great. Thanks for writing this script.
To the previous comment – I got the same error when I opened the xls directly from the zip file. After I saved it to a folder and opened it from there, it worked perfectly.
Jul 25, 2005
Steve Brown says:
Here's an update that handles newlines and other special chars in cells: Sub Se...Here's an update that handles newlines and other special chars in cells:
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 Do While InStr(specialChars, Right(cellStr, 1)) > 0 cellStr = Left(cellStr, Len(cellStr) - 1) Loop cellStr = Replace(cellStr, Chr(13), "\\" + Chr(13)) cellStr = Replace(cellStr, Chr(10), "\\" + Chr(13)) If cell.Font.Bold Then cellStr = "*" & cellStr & "*" If cell.Font.Italic Then cellStr = "_" & cellStr & "_" result = result & cellStr & " | " Next result = result & Chr(13) Next Dim MyDataObj As New DataObject MyDataObj.SetText result MyDataObj.PutInClipboard MsgBox "Confluence table copied to clipboard: " & Chr(13) & Chr(13) & result End SubOct 11, 2005
Fabrizio Magelli says:
In Excel 2002 Italian version don't work: Macro was fine imported in worksheet a...In Excel 2002 Italian version don't work:
Macro was fine imported in worksheet and seem working ... last MsgBox correctly appears. But NO chars in clipboard copied.
I suppose that MyDataObj.PutInClipboard dont work. I tried to put
Set cell = Cells(1000, 1)
cell.Value = result
and runs !! but size-char-limit in single cell is a limitation.
Any suggestions ?
Regards
Fabrizio
Dec 15, 2005
Brian Fisher says:
I had problems with Excel 2002 also, however this script (based on update above)...I had problems with Excel 2002 also, however this script (based on update above) appears to be good. Note: This copies numeric format instead of absolute value (eg: 75% vs 0.75XXXX).
Here's the script:
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.Text If Not IsEmpty(cellStr) And cellStr <> "" Then Do While InStr(specialChars, Right(cellStr, 1)) > 0 cellStr = Left(cellStr, Len(cellStr) - 1) Loop End If cellStr = Replace(cellStr, Chr(13), "\\" + Chr(13)) cellStr = Replace(cellStr, Chr(10), "\\" + Chr(13)) If cell.Font.Bold Then cellStr = "*" & cellStr & "*" If cell.Font.Italic Then cellStr = "_" & cellStr & "_" result = result & cellStr & " | " Next result = result & Chr(13) Next Dim MyDataObj As New DataObject MyDataObj.SetText result MyDataObj.PutInClipboard MsgBox "Confluence table copied to clipboard: " & Chr(13) & Chr(13) & result End SubDec 16, 2005
Lucas Ward says:
I am having trouble getting the macro to work. ( I'm using excel 2003 ) If...I am having trouble getting the macro to work. ( I'm using excel 2003 ) If I select a part of the spreadsheet to copy over, then press the 'Copy to Confluence' button, I get the correct message box telling me that it has been copied to the clipboard. However, there doesn't appear to be anything actually copied to the clipboard, or at least I'm not able to paste into anything. I checked, and my security settings are medium, I even tried bringing them down to low, but it still doesn't seem to work.
Dec 16, 2005
Phillip Bogle says:
I think I found the cause for the issues some people have been seeing; a hardcod...I think I found the cause for the issues some people have been seeing; a hardcoded path crept into the macro.
I have attached an updated verson of the macro that should fix this. It also includes the formatting improvement noted in Brian Fisher's message.
Note: Since I don't know how to check into subversion yet, I uploaded the changes as an attachment to this page. As soon as I find the right way to do things, I'll upload to subversion.
Jan 17, 2006
Kerstin Zimmermann says:
Hi, I just tried to use the brilliant new macro but so far I did not succeed. O...Hi,
I just tried to use the brilliant new macro but so far I did not succeed. Open macro, open my own Excel sheet, select cells I want to convert, click button - Excel also shows the correct data saved to the clipboard- everything seems perfectly okay. But when I try to paste the clipboard contents into my Confluence page - nothing happens. Hm. I seem to make a mistake somewhere. Any ideas?
Thanks,
Kerstin
Jan 31, 2006
Derek MacKie says:
I have the same problem. Nothing is on the clipboard.I have the same problem. Nothing is on the clipboard.
Feb 01, 2006
Jonathan Nolen says:
Make sure you are pasting into Wiki Markup mode, rather than into the Rich Text ...Make sure you are pasting into Wiki Markup mode, rather than into the Rich Text Editor.
Kerstin said that she had the correct data on her clipboard, but that it wouldn't paste. Derek said he didn't have anything on clipboard at all. Is that correct? Can you paste into a text document (Notepad or TextEdit) to confirm?
Feb 24, 2006
Glenn Weinstein says:
The Visual Basic macro in the current attachment definitely has a bug. The text...The Visual Basic macro in the current attachment definitely has a bug. The text is not being pasted to the clipboard at all.
This is because of an apparent typo on line 16:
That should read:
This is why nothing is showing up on the clipboard. If you fix it (as above), it will work fine.
Feb 24, 2006
Jonathan Nolen says:
When I open the script my Excel (Mac Office 2004) that line is correct. (It's al...When I open the script my Excel (Mac Office 2004) that line is correct. (It's also not on line 16, but that's beside the point). There's clearly some version weirdness going on.
Feb 28, 2006
Glenn Weinstein says:
I just checked the attachment again, and the typo is still there (and on Line 16...I just checked the attachment again, and the typo is still there (and on Line 16).
Specifically, I am downloading the Excel file listed at the top of this page, titled "Download Script," pointing to http://svn.atlassian.com/svn/public/contrib/confluence/office-converters/trunk/excel/ExcelToConfluence.xls.
I open that .xls file, hit Alt-F11, and I see MyDataObj.SetText s on Line 16.
Feb 28, 2006
Jonathan Nolen says:
Ah ha! The most recent version of the script was attached to the page, but never...Ah ha! The most recent version of the script was attached to the page, but never committed to SVN. I've committed it to SVN and removed it from the page, to avoid this confusion in the future.
Cheers,
Jonathan
Feb 02, 2006
Kerstin Zimmermann says:
Our test installation of Confluence 2 was uninstalled again due to a problem dis...Our test installation of Confluence 2 was uninstalled again due to a problem displaying special characters, so I cannot make further tries currently (I'm pretty sure I used the Markup mode, though)- but I can say this much: if I use the ExcelToConfluence.xls in my Excel application and copy cells, I get a pop up window showing precisely what is copied to the clipboard. When I open the clipboard itself at that moment, it also shows the correct data. And I can also paste the clipboard contents into a text editor.
Mar 13, 2006
Mike Angelastro says:
Is there any way to get the macro to include hyperlinks? Can it be modifie...Is there any way to get the macro to include hyperlinks? Can it be modified for this?
Mar 27, 2006
Kerstin Zimmermann says:
The macro works fine now, thanks!The macro works fine now, thanks!
Apr 28, 2006
Dave Bob says:
Hi, I have a question with regard wiki tables. Is it possible to change t...Hi,
I have a question with regard wiki tables. Is it possible to change the background colour of individual wiki table cells? If yes, how can this be done?
Appologies if this is the wrong place to ask such a question - I cannot seem to find anywhere more appropriate.
Cheers,
Darren
Apr 28, 2006
Bob Swift says:
If your excel spreadsheet has cell coloring, then setting formatCell=true when u...If your excel spreadsheet has cell coloring, then setting formatCell=true when using the [Excel Macro] will show the cell coloring. In general, there is the bgColor macro in Content Formatting Macros.
Aug 04, 2006
Ken Swank says:
Is there a way to convert the excel data into a "chart macro" output type?Is there a way to convert the excel data into a "chart macro" output type?
Aug 04, 2006
Alain Moran says:
{chart} {excel:myexelfile.xls} {chart} [Excel Macro] [Chart ...{chart} {excel:myexelfile.xls} {chart}[Excel Macro]
[Chart Plugin]
Aug 04, 2006
Ken Swank says:
This requires the Excel marco to be installed...right?This requires the Excel marco to be installed...right?
Aug 05, 2006
Alain Moran says:
I have yet to come across a confluence plugin that will work without it being in...I have yet to come across a confluence plugin that will work without it being installed!
There are two ways you can do this, both of which require confluence administrator priveledges.
The first is to download the plugin from http://svn.atlassian.com/svn/public/contrib/confluence/scripting-plugins/trunk/target/scripting-plugins-2.3.jar and then install it manually using /admin/plugins.action, the alternative (assuming you have our plugin repository plugin installed) is to navigate to /admin/repository/plugins.action, scroll down till you see the 'Scripting and External Content Plugin' and then click 'install'
If you dont have confluence admin priveledges, then please copy and paste the address to this comment (labeled 'permalink') and email it to someone within your organisation who does have confluence admin privs.
If they are unwilling to install this plugin (due to the other macros it contains) then you will either have to wait a while until the macros are split out into their own plugins (which I understand is underway, however I dont quite know when this will actually happen), or you can download the source and split the plugin out into it's own jar yourself, alterntively you may be able to talk someone else into doing this for you ... I'm pretty sure you can 'talk' adaptavist.com into doing this
Alain Moran - adaptavist.com
Aug 27, 2006
Michael McKeown says:
FYI - I've added a Content Converter for Office. The Excel part is based on th...Jul 14
Aleia Hutcherson says:
I am using Excel 2007 - when I click the cells I want to copy, I get an error me...I am using Excel 2007 - when I click the cells I want to copy, I get an error message "Copy of ExceltoConfluence.xls" cant be found