Nuxeo Add-Ons

Nuxeo Spreadsheet

Updated: March 18, 2024

The Nuxeo Spreadsheet add-on allows to bulk edit documents starting from a content view result set, providing a spreadsheet-like user experience.

This add-on 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:

JSF UI

To visualize 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.

Web UI

To visualize in a spreadsheet the content of a folder or of the result of a search, click on 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 icon 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.

Standalone Mode

A standalone mode is accessible through this URL: https://NUXEO_SERVER/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 = &ldquo;vocabularies&rdquo;

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 Nuxeo Spreadsheet add-on is done integrating Handsontable.