I have a couple of queries related to Aspose.Slides and Aspose.Cells:
Linking an External Excel File to a Pre-Generated Chart: I am using the setExternalWorkbook function to link an external Excel file to a chart. This works perfectly when the chart is generated programmatically using Aspose.Slides. However, when I try to use the same function to link an external Excel file to a pre-generated chart (already present in the PowerPoint slide), PowerPoint throws an error upon opening the file. The chart is removed from the slide, and PowerPoint indicates that the chart caused an issue. Could you please help me understand why this might be happening and how I can resolve this issue?
Modifying Embedded Workbooks in Charts Generated by a Third-Party Tool (Seismic): We are using a third-party vendor, Seismic, to generate charts in PowerPoint. These charts have embedded workbooks. I need to access the embedded workbook of a Seismic-generated chart and perform the following actions:
Add multiple sheets to the embedded workbook.
Add additional data to the existing sheets in the workbook.
Could you guide me on how to achieve this using Aspose.Slides (or Aspose.Cells, if required)?
The following error is caused upon opening the powerpoint file:
“PowerPoint found a problem with content in “Sample_PPTX”. Powerpoint can attempt to repair the presentation. If you trust the source of this presentation, click repair.”
And post clicking repair, the chart from the slide is removed.
We kindly request you to share a standalone Java code or application, along with the necessary resource files, to help us understand and address the issue. We will review it as soon as possible.
Please see the document: Manage OLE|Aspose.Slides Documentation for your reference on how to change underlying (OLE) data for your reference. In case, you find any issue, please provide a sample PowerPoint PPT/PPTX file that contains the embedded workbook(s)? We will evaluate it soon.
P.S. Kindly zip the sample application and resource files before attaching them here.
The above code works when i create a presentation and add a chart using aspose but when i try to access an existing chart, it fails.
The object on the slide is an instance of “IChart” not an (IOleObjectFrame), so I am trying to add some additional data to the embedded workbook of the chart using
readWorkbookStream() and writeWorkbookStream()
and writeWorkbookStream() takes quite a long time to update the workbook and upon opening the presentation and trying to access the embeddd workbook by clicking on “Edit Data” of the chart, i get the following error:
The linked file isn’t available. This error can occur if the linked file has been moved or hasn’t been saved. Embedding the data instead of linking it can help avoid this error, but the data won’t be updated automatically if it changes the source file.
Thanks for providing further details and code snippet.
One of my colleagues from Aspose.Slides team will evaluate your issue and get back to you with details soon, @andrey.potapov FYI. In the meantime, could you please zip and attach your sample files here. This would help us to evaluate your issue precisely and to consequently figure it out soon.
Could you just confirm, whether the IChart’s “setExternalWorkbook” function of Aspose.slides in Java(25.3) works for pre-generated Powerpoint charts? If yes, could you please provide a working code snippet for the same?
Below is the code I have used which is causing the above mentioned error:
@singlma,
Thank you for your patience. Unfortunately, I’ve found some issues related to the setExternalWorkbook method and am not yet ready to provide a working code example.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): SLIDESJAVA-39661
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
You can extract the workbook from the chart data using Aspose.Slides, change the workbook using Aspose.Cells, and rewrite the chart data using Aspose.Slides.
IChartData chartData = chart.getChartData();
byte[] workbookData = chartData.readWorkbookStream();
// Change the workbook data using Aspose.Cells here.
chartData.writeWorkbookStream(workbookData);
My colleagues from Aspose.Cells team will assist you in adding multiple sheets and additional data to the workbook. @amjad.sahi FYI
Thankyou for your continued support. Please update me when you have a working example of setExternalWorkbook function for a pre-generated PowerPoint charts. I will await the resolution as per the terms outlined in your Free Support Policies.
@singlma,
Our developers have investigated the issue under ticket SLIDESJAVA-39661. Unfortunately, using the setExternalWorkbook method for the previously created charts with embedded workbooks is impossible. We suggest using the writeWorkbookStream method instead of setExternalWorkbook.
Thanks for the clarification and the code snippet.
Understood that linking an external workbook to a pre-generated chart is currently not supported, and that writeWorkbookStream is the recommended approach for modifying the embedded workbook instead.
One final question before closing the thread- do you anticipate support for linking external workbooks to pre-existing charts being added in future releases of Aspose.Slides?
@singlma,
Unfortunately, the setExternalWorkbook method works only for new charts, as it does in PowerPoint. Remaking an old chart is difficult, and errors of the type you described are likely to occur.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.