LiveTableExcelExport Macro
Add an Excel export button to a livetable. |
Type | XAR |
Category | Macro |
Developed by | Guillaume Delhumeau, Ludovic Dubost, Anca Luca, slauriere |
Active Installs | 48 |
Rating | |
License | GNU Lesser General Public License 2.1 |
Table of contents
Description
Adds a button to the LiveTable as shown on the following screenshot:
Usage
Just write:
Where my-livetable is your Livetable's name.
Parameters
Name | Optional | Allowed values | Default value | Description |
---|---|---|---|---|
withPageName | yes | true/false | true | adds a 'wiki page name' to the excel sheet |
withPageURL | yes | true/false | true | adds a 'wiki page URL' to the excel sheet |
withAllFields | yes | true/false | false | forces the display of all the fields of the class in the exported excel (regardless of the columns displayed in the livetable) |
filename | yes | any string | livetable | allows to configure the name of the exported filename |
Note on the scalability
Note that this tool exports all the results from the livetable, while upon display on screen the results are paginated. Because of this, the time it takes will depend on the number of entries you have in total in your livetable. Depending on your application server settings, you might have a server (the servlet container or another http server in front - like apache) return an Internal server error before the export is done and thus the export will not work. However, the performance depends on so many factors related to the server setup and the data exported, that is is almost impossible to give generic number that would make sense.
Prerequisites & Installation Instructions
We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.
You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:
- Log in the wiki with a user having Administration rights
- Go to the Administration page and select the Import category
- Follow the on-screen instructions to upload the downloaded XAR
- Click on the uploaded XAR and follow the instructions
- You'll also need to install all dependent Extensions that are not already installed in your wiki
Troubleshooting
Release Notes
v2.0
This release comes with a full revamping of the strategy to get the livetable results: it now uses the livetable macros to get the results and re-serializes as Excel.
The values sent in the excel are the display values from the livetable, and if the display value contains html the exported value will be the raw value.
Also, the minimum version was bumped to 5.4.7.
Full list under:
- [XALTXLS-13] - Excel export button doesn't appear when the livetable name contains special chars
- [XALTXLS-15] - Allow to control the exported file name with a parameter passed to the macro
- [XALTXLS-12] - Refactor this extension to reuse the livetable macros instead of duplicating them
- [XALTXLS-14] - On recent versions of XWiki (8.4.x) the export button is displayed in a confusing place in the livetable
v1.8.1
- Now is is compatible with application created with AppWithinMinutes in XWiki >= 4.5.3 (See: XALTXLS-2).
v1.8
- Use the same translations keys than the livetable for the columns names.
- Export dates with the 'Date' excel format.
v1.7.1
The dependencies are fixed.
v1.7
- Added parameter to allow forcing the display of all the fields of the class in the export, regardless of the columns configured in the livetable (withAllFields)
- Added required rights to the documents that need programming rights
- Polished the formatting of the values for the export: in general they are exported as returned by the respective display functions for the respective fields, with the exception of boolean values which are exported as 1 or 0 and the textarea fields which are rendered as plain text when exported.
v1.6
- Clean HTML tags for custom fields before display.
- Now needs Programing Rights to install
Dependencies
Dependencies for this extension (org.xwiki.contrib:xwiki-livetable-excel-export-macro 4.0.1):