page_white_excelAdd an 'Excel export' button to the Livetable of your choice.
TypeXAR
Developed by

Guillaume Delhumeau, Anca Luca

Active Installs46
Rating
Rate!
2 Votes
LicenseGNU Lesser General Public License 2.1
Installable with the Extension Manager

Description

Adds a button to the LiveTable as shown on the following screenshot:

excel-export.png

Usage

Just write:

{{addExcelExportToLivetable livetable="my-livetable" /}}

Where my-livetable is your Livetable's name.

Currently, this macro does not work with livetables that use custom JSON results page, except for livetables generated by AppWithinMinutes.

Parameters

NameOptionalAllowed valuesDefault valueDescription
withPageNametruetrue/falsetrueadds a 'wiki page name' to the excel sheet
withPageURLtruetrue/falsetrueadds a 'wiki page URL' to the excel sheet
withAllFieldstruetrue/falsefalseforces the display of all the fields of the class in the exported excel (regardless of the columns displayed in the livetable)

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.

Tested on

This extension has been tested with the following configurations.

Extension VersionXWiki FlavorNotes
1.6XWiki Enterprise 3.5
1.8XWiki Enterprise 6.4.2. 7.1.2

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:

  1. Log in the wiki with a user having Administration rights
  2. Go to the Administration page and select the Import category
  3. Follow the on-screen instructions to upload the downloaded XAR
  4. Click on the uploaded XAR and follow the instructions
  5. You'll also need to install all dependent Extensions that are not already installed in your wiki

You need the Excel Plugin to be installed. Make sure to add the Excel Plugin to "List of active plugins" from your WEB-INF/xwiki.cfg file. 

Make sure that pages Macros.AddExcelExportToLivetableMacro and Macros.AddExcelExportToLivetableMacroGroovy are saved with a user that have the Programming Rights.

Troubleshooting

For old wikis, the macro may not work. If you have the issue, please edit the page "Macros.AddExcelExportToLivetableMacro" with the object editor, find the object "WikiMacroClass 0: Add Excel export to Livetable", and remove the following line from the object content:
var livetable = window.livetable_$xcontext.macro.params.livetable;

Release Notes

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. This might be a regression.

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. This can be a backwards compatibility issue as some values are displayed differently now.

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 1.8.2):

Tags:
Created by Guillaume Delhumeau on 2012/02/08 15:14
    

Get Connected