ONLYOFFICE / DocumentBuilder

ONLYOFFICE Document Builder is powerful text, spreadsheet, presentation and PDF generating tool
https://www.onlyoffice.com/document-builder.aspx
GNU Affero General Public License v3.0
112 stars 56 forks source link

Chart Data in Presentation is not Editable #76

Closed CKolkey closed 2 years ago

CKolkey commented 2 years ago

I'm following the presentation chart api documentation: (https://api.onlyoffice.com/docbuilder/presentationapi/api/createchart)

builder.CreateFile("pptx");
oPresentation = Api.GetPresentation();
oSlide = oPresentation.GetSlideByIndex(0);
oSlide.RemoveAllObjects();
oShape = Api.CreateChart("bar3D", [
  [200, 240, 280],
  [250, 260, 280]
], ["Projected Revenue", "Estimated Costs"], [2014, 2015, 2016], 4051300, 2347595, 24);
oShape.SetSize(300 * 36000, 130 * 36000);
oShape.SetPosition(608400, 1267200);
oSlide.AddObject(oShape);
builder.SaveFile("pptx", "CreateChart.pptx");
builder.CloseFile();

I've created a presentation without issue and the pptx file is viewable in powerpoint. However, if I right click on the resulting chart and try to edit the data, I'm met with the following error:

Screenshot 2022-02-15 at 17 00 05

This happens on both windows and macos, on both my local machine and on the onlyoffice api documentation page (link above).

For fun, I opened up the pptx (zip) file to see if there was an embedded xlsx file, and sure enough, it's there. The relation ID's seem to be correct, too. However when I attempt to open the xlsx file on its own in excel, I'm being told that there are issues with the file, and that excel needs to repair it. Here's the repair log:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
    <logFileName>Repair Result to Microsoft_Excel_Worksheet10.xml</logFileName>
    <summary>Errors were detected in file ’/Users/cameron/Downloads/presentation - 2022-02-15T163131.751/ppt/embeddings/Microsoft_Excel_Worksheet1.xlsx’</summary>
    <repairedRecords summary="Following is a list of repairs:">
        <repairedRecord>Repaired Records: Table from /xl/tables/table1.xml part (Table)</repairedRecord>
    </repairedRecords>
</recoveryLog>

Now here's the real trick: this occurs when using the API page I linked to above. The chart data is editable in your webapp, but not in powerpoint or excel, so I feel confident that the issue is not in my local setup.

Steps to reproduce the problem:

  1. Visit: https://api.onlyoffice.com/docbuilder/presentationapi/api/createchart
  2. Download file as pptx
  3. Attempt to edit chart data in powerpoint (right click chart > edit data)
  4. See issue

For posterity, here is the setup I am using locally:

DocumentBuilder version: v7.0.0.132 (sdk version: 7.0.0 (build:132))

Installation method: https://www.onlyoffice.com/en/download.aspx#builder (for centos)

Operating system: linux/centos

I've also attached an offending pptx file, though it's the exact one downloaded from your api docs. Example Title.pptx

l8556 commented 2 years ago

Hi @CKolkey

Thank you for your issue I can confirm - this is a bug. Issue 55567 in our private issue tracker.

CKolkey commented 2 years ago

Outstanding, thanks for the quick response. Out of curiosity, do you have any kind of rough timeline for a fix?

l8556 commented 2 years ago

Sorry I'm just a QA guy and cannot provide any time frames to any fix

If you really need this problem fixed - better to contact sales@onlyoffice.com or support@onlyoffice.com if you're already a paying customer.

CKolkey commented 2 years ago

Will do, thanks.

l8556 commented 2 years ago

Hi @CKolkey

We fixed this issue at fix bug #55567 This will be released as 7.1.0, but I cannot give ETA for this release.

CKolkey commented 2 years ago

I really appreciate the fast turnaround - thanks!

ShockwaveNN commented 2 years ago

I'll leave this issue opened until we'll release this fix

ShockwaveNN commented 2 years ago

DocumentBuilder v7.1 is released and this issue should be fixed. I'm closing it, feel free to comment or create new if got any troubles