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)
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
Related Topics: TWikiPlugins,
DeveloperDocumentationCategory,
AdminDocumentationCategory,
TWikiPreferences,
TWiki:Plugins.ExcelImportExportAddOn
--
TWiki:Main.ThomasWeigert - 13 Aug 2006