How to edit chart in powerpoint when converted Excel to PPTX

Hello,

I am using Aspose total license and version is 20.7.0.
I have an excel with some charts. We want to convert excel or pdf into pptx file format and restore the charts as it is but they are converted as image. In excel we have bound chart with data sheet. How to get the datasheet in power point? Or how to edit the chart when converted excel to power point file.

Please see attach sample excel file and output pptx file. Also attaching code snippet.
For Aspose.zip (48.2 KB)

private static void saveToPPTCurrentVersion()
    {
        string dataDir = @"Aspose20.7.0Demo/";
        var wb = new Workbook(dataDir + "TestWithChart.xlsx");
        wb.CalculateFormula();
        PdfSaveOptions pdfSaveOptions = new Aspose.Cells.PdfSaveOptions();
        pdfSaveOptions.OnePagePerSheet = false;
        wb.Save(dataDir + "pdfOutput.pdf", pdfSaveOptions);
        var document = new Aspose.Pdf.Document(dataDir + "pdfOutput.pdf");
        document.Save(dataDir + "output.pptx", Aspose.Pdf.SaveFormat.Pptx);

    }

Thanks,
Sarthak

@SPDora,

Thanks for the sample Excel file and Powerpoint presentation.

Please note, when you render Excel spreadsheets to PDF or DOCX/PPTX (new versions support this conversion), the charts are rendered as static pictures. To get editable charts in Powerpoint presentation, you may create Excel chart or load an existing file containing Excel chart via Aspose.Cells APIs and then embed it in Presentation as OLE Object via Aspose.Slides API. See the document with example code on how to create an Excel chart via Aspose.Cells APIs and then embed the chart as Ole Object in Powerpoint presentation via Aspose.Slides for your reference.

Thank you for your reply.

Do we have any option like PptxSaveOptions where we specify if we want chart not image?
I tried PptxSaveOptions saveOption = new PptxSaveOptions(false); but that didn’t work for me.
Do we have any property where while saving I can specify my requirement instead of using OLE object.

Thanks

@SPDora,

No, as I told you, there is no such option available. Even saving directly to PPTX format would save the charts as static pictures. The only way is use and embed Excel charts as OLE objects. Otherwise, you have to use Aspose.Slides APIs to create charts in Powerpoint presentations from the scratch, see the document for your reference:

Got it, thanks for you support.

Do you know in future if this functionality would be there as SaveOption? Or if you could pass this as a feedback to the team.

Thanks

@SPDora,

I am not sure about it. We will get back to you after have a discussion with the team.

1 Like

@SPDora
This feature is not supported now.
We will look into this feature with issue id CELLSNET-52211