Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-96032

Can't preview .xls file on "Office Excel" macro if the Worksheet Name parameter is specified

      Issue Summary

      If an .xls file is added to the Office Excel macro and the Worksheet Name macro parameter is specified, the macro does not display the expected content and instead displays an error message:

      We can't preview this file. You'll have to download the file to view it.

      This is reproducible on Data Center: (yes) / (no): Yes

      Steps to Reproduce 

      1. Create a page, attach an Excel file (.xls), and then save the page.
      2. Edit the page and insert Office Excel Macro.
      3. While inserting the file, enter the Worksheet Name parameter based on the sheet name of the Excel file, as shown in the screenshot below:
      4. Click the save button and update the page. 

      Expected Results

      The content of the designated sheet should be appropriately displayed on the Confluence page.  

      Actual Results

      Once the page is saved, the macro displays an error message on the Confluence page, as shown below:

      The logs will display the following error message:

      2024-06-26 13:12:55,145 ERROR [http-nio-8090-exec-5 url: /confluence/rest/office/1.0/view; user: admin] [com.benryan.rest.ConverterMacroResource] getContent The supplied data appears to be in the OLE2 Format. You are calling the part of POI that deals with OOXML (Office Open XML) Documents. You need to call a different part of POI to process this data (eg HSSF instead of XSSF)
       -- referer: https://localhost:8090/confluence/display/TEST/new+xls+file+page | url: /confluence/rest/office/1.0/view | traceId: 75fa95e96ee302a8 | userName: admin 

      Workaround 

      Note: The issue can't be reproduced in 7.19.20.

      As a workaround, we can perform either one of the following steps:

      1. Edit the Excel macro on the page to remove the value of the Worksheet Name parameter.
      2. Convert the file extension from .xls to .xlsx and re-upload the file to the page.

            [CONFSERVER-96032] Can't preview .xls file on "Office Excel" macro if the Worksheet Name parameter is specified

            James Ponting made changes -
            Link New: This issue is related to CONFSERVER-96289 [ CONFSERVER-96289 ]
            Niraj Bhawnani made changes -
            Labels Original: fireball sec-escape security-escape New: fireball sec-escape
            Niraj Bhawnani made changes -
            Labels Original: fireball security-escape New: fireball sec-escape security-escape
            Edward made changes -
            Remote Link New: This issue links to "Page (Extranet)" [ 942243 ]
            Edward made changes -
            Link New: This issue is duplicated by CONFSERVER-97549 [ CONFSERVER-97549 ]
            Akshay Rai made changes -
            Fix Version/s Original: 8.5.13 [ 108816 ]
            Akshay Rai made changes -
            Fix Version/s New: 8.5.14 [ 108954 ]
            Akshay Rai made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: Waiting for Release [ 12075 ] New: Closed [ 6 ]
            SET Analytics Bot made changes -
            UIS Original: 50 New: 10
            Thomas Rogozinski made changes -
            Status Original: Awaiting Merge [ 10064 ] New: Waiting for Release [ 12075 ]

              a9293dbdc671 Thomas Rogozinski
              9dd52b4ca361 Brent Lin
              Affected customers:
              13 This affects my team
              Watchers:
              19 Start watching this issue

                Created:
                Updated:
                Resolved: