ExcelImportExportPlugin

This plugin renders an attached Excel spreadsheet as a TWiki table, and vice versa. It also provides scripts to generate a set of topics from an Excel spreadsheet, and vice versa.

The code of this plugin is based on the TWiki:Plugins.ExcelImportExportAddOn by TWiki:Main.ClausLanghans.

Syntax Rules

  • Syntax: %EXCEL2TABLE{"topic" ...}%
  • Supported parameters:
    Parameter: Description: Default:
    topic="..." The topic at which the spreadsheet is attached Current topic
    file="..." Default parameter: The name of the attached spreadsheet file (without the extension) Current topic
    template="..." A form definition (see TWikiForms); it defines the columns of the table to be generated Current web

Inserts the first worksheet of the designated Excel spreadsheet as a table, formatted per the definition of the form given in the template parameter.

  • Syntax: %TABLE2EXCEL{"topic" ...}%
  • Supported parameters:
    Parameter: Description: Default:
    topic="..." The topic at which the spreadsheet is attached Current topic
    file="..." Default parameter: The name of the generated spreadsheet file (without the extension) Current topic
    map="..." The topic which contains the mapping between the columns of the table and the columns in the generated Excel file. Current topic

Generates an Excel spreadsheet file from the first table found in this topic, with the columns mapped as given in the map parameter.

For further details, and the documentation of the scripts excel2topics and topics2excel please see the example in IssueExcelExportImport.

Plugin Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, i.e. %SMARTEDITPLUGIN_SHORTDESCRIPTION%

  • One line description, is shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Renders an attached Excel spreadsheet as TWiki table

  • Debug plugin: (See output in data/debug.txt)
    • Set DEBUG = 0

Plugin Installation Instructions

Note: You do not need to install anything on the browser to use this add-on. The following instructions are for the administrator who installs the add-on on the server where TWiki is running.

  • Download the archive from the Plugin Home (see below)
  • Unpack the archive in your twiki installation directory. Content:
    File: Description:
    lib/TWiki/Plugins/ExcelImportExportPlugin.pm  
    lib/TWiki/Plugins/ExcelImportExportPlugin/Import.pm  
    lib/TWiki/Plugins/ExcelImportExportPlugin/Export.pm  
    data/TWiki/ExcelImportExportPlugin.txt  
    bin/excel2topics  
    bin/topics2excel  
    bin/table2excel  
    data/Sandbox/ExcelExport1.txt  
    data/Sandbox/ExcelImport1.txt  
    data/Sandbox/IssueExcelExportImport.txt  
    data/Sandbox/IssueTrackingForm.txt  
    pub/Sandbox/IssueExcelExportImport/IssueExcelExportImport.xls  

  • Make sure that all files are readable by the web server user, that the scripts are executable, and that the scripts are given the proper access rights in your .htaccess file, if applicable.

Look at the example in Sandbox...

Plugin Info

Plugin Author: TWiki:Main.ThomasWeigert, based on code by TWiki:Main.ClausLanghans
Copyright: © 2001-2006, TWikiContributor
License: GPL (GNU General Public License)
Plugin Version: 13 Aug 2006
Change History:  
13 Aug 2006: Initial version
TWiki Dependency:  
CPAN Dependencies:
NameVersionDescription
Spreadsheet::ParseExcelRequired. Available from CPAN.
Spreadsheet::WriteExcelRequired. Available from CPAN.
Date::ManipRequired. Available from CPAN.
Other Dependencies: none
Perl Version: 5.005
TWiki:Plugins/Benchmark: GoodStyle nn%, FormattedSearch nn%, ExcelImportExportPlugin nn%
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/ExcelImportExportPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/ExcelImportExportPluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/ExcelImportExportPluginAppraisal

Related Topics: TWikiPlugins, DeveloperDocumentationCategory, AdminDocumentationCategory, TWikiPreferences, TWiki:Plugins.ExcelImportExportAddOn

-- TWiki:Main.ThomasWeigert - 13 Aug 2006

Topic revision: r8 - 27 Mar 2005 - 13:14:15 - TWikiContributor
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.ExcelImportExportPlugin