Viewing Excel Error with the Message "Error rendering macro 'viewxls' : com.benryan.conversion.ConversionException: com.benryan.conversion.ConversionException: Cannot convert spreadsheet"

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

Adding an excel document in a page resulted with the following error:

1 Error rendering macro 'viewxls' : com.benryan.conversion.ConversionException: com.benryan.conversion.ConversionException: Cannot convert spreadsheet, the number of cells: xxx is greater than the maximum allowed cells: 100000

or

1 [xhtml.view.macro.ViewMacroMarshaller] marshal Exception executing macro: viewxls, with message: com.benryan.conversion.ConversionException: Cannot convert filename.xlsx, this file exceeds the maximum file size for xlsx files of 2MB.

Cause

This is a known issue, a limitation within the Office Connector. This issue is being tracked here:

Besides, there is a hard limit of 100000 cells where the macro is not able to render more than this limit. A feature request has been opened to track this:

Workaround

  1. Add parameter in CATALINA_OPTS

    Add the following parameter to your Confluence CATALINA_OPTS within either the setenv.sh (Linux) or setenv.bat (Windows) file:

    1 -Dofficeconnector.spreadsheet.xlsxmaxsize=134217728
  2. Upgrade to Confluence 5.7 and above

Updated on April 11, 2025

Still need help?

The Atlassian Community is here for you.