The Nuxeo Spreadsheet addon allows to bulk edit documents starting from a content view result set, providing a spreadsheet-like user experience.
This addon allows you to edit data in your repository as if you were in a spreadsheet-like grid, like copy and paste by dragging the cell's value.
Nuxeo Spreadsheet can be used in three different use cases:
Web UI
To visualise in a spreadsheet the content of a folder or of the result of a search, click on the icon (1) at the top right of your content view.
The spreadsheet editor opens and displays as many line as there are items in the result of the query. The columns that are displayed corresponds to the columns that were displayed on the content view. If you modify the list of columns in the content view clicking on the columns icon (2) from the content view, this will be reflected on the spreadsheet when re-opening it.
The columns displayed on the spreadsheet reflects the columns contributed as search results layout on Web UI. For example:
<nuxeo-data-table class="results">
<nuxeo-data-table-column name="Title" field="dc:title">
<template>
...
</template>
</nuxeo-data-table-column>
<nuxeo-data-table-column name="Modified" field="dc:modified">
<template>
...
</template>
</nuxeo-data-table-column>
<nuxeo-data-table-column name="Last Contributor" field="dc:lastContributor">
<template>
...
</template>
</nuxeo-data-table-column>
</nuxeo-data-table>
To modify a value
Click on the cell so as to make the editor appears. Once a cell is modified it becomes blue.
You can modify has many cells you want without saving, and click on Save when you want to save.
The Autosave button allows you to automatically save all the changes done on the spreadsheet.
To revert a modification
If you want to reverse a change on a cell, click right on the cell concerned and select Undo.
Enable Spreadsheet Button Contribution in Web UI
Starting from LTS 2021, the Spreadsheet addon is integrated in Web UI, however, the button contribution is disabled by default.
To display the button in Web UI, users should go to Studio Designer, select the Buttons
entry in the left UI menu and enable the spreadSheet
button in the RESULTS_ACTIONS slot.
Notice that in older versions, Nuxeo Spreadsheet is a separate addon and it is automatically enabled on package install.
JSF UI
To visualise in a spreadsheet the content of a folder or of the result of a search, click on .
The spreadsheet editor opens and displays as many line as there are items in the result of the query. The columns that are displayed corresponds to the columns that were displayed on the content view. If you modify the list of columns in the content view clicking on the icon from the content view, this will be reflected on the spreadsheet when re-opening it. The spreadsheet module uses the layout introspection API to be able to list the columns displayed in the content view. A mapping is done for each Layout Widget so as to display an adapted cell editor, among Simple text, DirectoryValue suggest and calendar.
See the limitations section for details of the mapping.
Results are fetched page per page using the following page provider:
<extension target="org.nuxeo.ecm.platform.query.api.PageProviderService"
point="providers">
<coreQueryPageProvider name="spreadsheet_query">
<property name="maxResults">1000</property>
<pattern quoteParameters="false" escapeParameters="false">?</pattern>
<pageSize>1000</pageSize>
</coreQueryPageProvider>
</extension>
To modify a value
Click on the cell so as to make the editor appears. Once a cell is modified it becomes blue.
You can modify has many cells you want without saving, and click on Save when you want to save.
The Autosave button allows you to automatically save all the changes done on the spreadsheet.
To revert a modification
If you want to reverse a change on a cell, click right on the cell concerned and select Undo.
Standalone Mode
A standalone mode is accessible through this URL: https:/nuxeo-platform-url/nuxeo/spreadsheet/, where you have to enter a NXQL query to fetch your documents. From this URL you can do all the same actions than on your Nuxeo Platform instance.
Note: When opening the spreadsheet to edit a list of documents it relies on the content view definition to determine the layout and page provider to use. In standalone mode it relies on a custom spreadsheet_listing
layout and on a spreadsheet_query
page provider.
Vocabularies
To display translated labels for vocabularies the spreadsheet relies on content enrichers, thus optimizing the number of requests sent to the server.
By using a set of vocabulary content enrichers with a shared vocabularies category the spreadsheet is able to retrieve all the current labels for vocabulary backed properties by specifying X-NXContext-Category = “vocabularies”
To enable loading labels for a custom directory a new vocabulary content enricher must be configured, ex:
<enricher name="myvocabulary" class="org.nuxeo.ecm.automation.io.services.enricher.VocabularyEnricher">
<category>vocabularies</category>
<parameter name="field">prefix:field</parameter>
<parameter name="directoryName">myvocabulary</parameter>
</enricher>
Note that the spreadsheet expects the enricher's name to match the directory name.
Limitations
- The system information in read-only like Modified, Version and State are in grey to disable users to modify them.
- For more information about the Mapping between listing layouts widgets and the displayed cell types, see https://github.com/nuxeo/nuxeo-platform-spreadsheet/blob/9.10/nuxeo-platform-spreadsheet-web/src/main/js/app/ui/widgets.js#L64
The Nuxeo Spreadsheet addon is done integrating Handsontable.