Tags:
import2Add my vote for this tag spreadsheet2Add my vote for this tag create new tag
, view all tags

Excel Export as TWiki Table Addon

We had a number of tables that were kept as excel spreadsheerts, and I needed a fast way to convert the spreadsheet into a TWiki table.

The attached .bas file is a macro for Microsoft Excel 2000, and I believe earlier versions. To install it:

  • Download the file ExportToTwiki.bas
  • Start Excel
  • In excel choose: Tools -> Macros -> "Visual Basic Editor"
  • Right click on "VBA Project (Personal.XLS)"
  • Choose "Import File", and import the ExportToTwiki.bas file
  • Choose Tools -> References, ensure that "Microsoft Forms 2.0 Object Library" is checked and click OK. (Note: If there is no "Microsoft Forms 2.0 Object Library" on the list, then click on "Browse" and choose the file FM20.dll, and it should appear. Enabling the Analysis ToolPak add-in will also make this reference available.)
  • Exit the window by clicking on the X decoration at the upper right, or use Alt-Q, or choose File -> return to excel.

Because you added this macro to your personal.XLS, it will be available for all the spreadsheets you open.

To export the current spreadsheet in TWiki format type Alt-F8 and choose ExportDBToTWiki. The exported table is now in the clipboard and can be pasted into the TWiki edit window.

This macro works for me, your mileage may vary etc. Make sure you look at the file for changes after I have uploaded this in case somebody thinks about playing games.

Add-On Info

  • Set SHORTDESCRIPTION = Excel macro to convert Excel spreadsheerts into TWiki table format

Add-on Author: TWiki:Main.JohnRouillard, TWiki:Main.SteveRJones, TWiki:Main.ElliotSchwartz, TWiki:Main.JosMaccabiani, TWiki:Main.BrankoBange, TWiki:Main.GeorgeDias
Add-on Version: V 1.9, 24 Nov 2009
Change History:
24 Nov 2009: Version 1.9 - Added numerous capabilities, and code comments
20 Aug 2008: Version 1.8 - For merge cells,use of multi-span for rows
05 May 2008: Version 1.7 - Added more formatting support
04 Nov 2006: Version 1.6 - Added hyperlink support
06 Jan 2006: Version 1.4 - Direct export to clipboard; added support for horizontally joined cells
10 Jul 2005: Version 1.3 - Added export of italic cells with underscores
03 Nov 2004: Version 1.2 - Added export of bold cells with asterisks
14 Aug 2003: Version 1.1 - Added ALT-ENTER (hard carriage return) removal code
11 Aug 2003: Initial version
CPAN Dependencies: none
Other Dependencies: Excel
Perl Version: N/A
License: ???
Add-on Home: http://TWiki.org/cgi-bin/view/Plugins/ExcelExportTwikiTableAddOn
Feedback: http://TWiki.org/cgi-bin/view/Plugins/ExcelExportTwikiTableAddOnDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/ExcelExportTwikiTableAddOnAppraisal

Related Topic: TWikiAddOns

-- TWiki:Main.BrankoBange - 06 Jan 2006

Topic attachments
I Attachment Action Size Date Who Comment
Unknown file formatbas ExportToTWiki1.5.bas manage 3.9 K 2006-06-15 - 00:44 ChrisWerry center and right align cells where formatted center or right, right align numeric fields, use currcell.text instead of .value to preserve numeric formatting
Unknown file formatbas ExportToTWiki1.6.bas manage 4.4 K 2006-11-04 - 12:44 RockyLin Added hyperlink support
Unknown file formatbas ExportToTWiki1.7.bas manage 5.3 K 2008-05-04 - 21:59 ChrisWerry Chris Wrigley's changes: fixed merged cells, coloured text, pipe character and strikethrough
Unknown file formatbas ExportToTWiki1.8.bas manage 5.5 K 2008-08-20 - 14:09 KingWei For merge cells,use of multi-span for rows
Unknown file formatbas ExportToTWiki1.9.bas manage 15.8 K 2009-11-24 - 15:06 GeorgeDias - Replaced loops utilized to detect and replace hard-returns and occurrences of pipe with the native Replace function.
- Added %NOP% to WikiWords within the text to prevent automatically creation of hyperlinks.
- Added <literal>..</literal> tag to color text.
- Added TWiki cell color format.
- Added Table Plugin settings capabilities.
Unknown file formatbas ExportToTwiki.bas manage 2.2 K 2003-08-11 - 02:43 JohnRouillard Excel Macro to save sheet in TWiki table format
Unknown file formatbas ExportToTwiki1.1.bas manage 3.0 K 2003-08-15 - 17:10 SteveRJones V1.1 of John's VBas macro + strip ALT-ENTER chars
Unknown file formatbas ExportToTwiki1.2.bas manage 3.3 K 2004-11-04 - 02:40 ElliotSchwartz V1.2 recognizes bold cells
Unknown file formatbas ExportToTwiki1.3.bas manage 3.5 K 2005-07-10 - 20:04 JosMaccabiani added support for italic text
Unknown file formatbas ExportToTwiki1.4.bas manage 3.2 K 2006-01-06 - 10:52 UnknownUser exports directly to the clipboard; supports horizontally joined cells
Topic revision: r21 - 2010-07-23 - 04:28:47 - PeterThoeny
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
TWiki logoIdeas, requests, problems regarding TWiki? Send feedback.
Copyright © 1999-2010 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.