Viewing Excel Error with the Message "Error rendering macro 'viewxls' : com.benryan.conversion.ConversionException: com.benryan.conversion.ConversionException: Cannot convert spreadsheet"
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
Server* 製品のサポートは 2024 年 2 月 15 日をもって終了します。Server 製品を利用している場合は、Atlassian Server のサポート終了のお知らせページにて移行オプションをご確認ください。
*Fisheye および Crucible は除く
問題
Adding an excel document in a page resulted with the following error:
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
または
[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.
原因
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:
回避策
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:
-Dofficeconnector.spreadsheet.xlsxmaxsize=134217728
Check Configuring System Properties for more information on adding the parameter above
This will allow you to add spreadsheets up to 128 MB in size, but be aware that larger spreadsheets can take a while to convert
Read through Office Connector Limitations and Known Issuesas a part of the consideration for the workaround.
Upgrade to Confluence 5.7 and above