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](https://user-images.githubusercontent.com/7228095/154099951-092cdcf9-20eb-4f94-9c45-df615cd8e112.png)
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:
- Visit: https://api.onlyoffice.com/docbuilder/presentationapi/api/createchart
- Download file as pptx
- Attempt to edit chart data in powerpoint (right click chart > edit data)
- 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