How can we recalculate formula in chart cells?

We put formula in chart’s cells. After fill out the chart dinamically we want to recalculate and enforce the formulas in the cells. When we open the PPT after save with Aspose.slides the cell’s value are not evaluated after we click “edit data” on the chart data.

Hi Weinacht,


I have observed your comments. Can you please share source presentation, generated result and sample project to reproduce the issue. Also please share steps to reproduce issue. Before sharing the requested information, i suggest you to please try to use Aspose.Slides latest version on your end if you are using some older version.

Best Regards,

In the chart data we pupulate Column A and B with Aspose, in Column C we have a formula which calculates the value for the blue bubbles. You can see there are no values for the series for the last see item (right hand side) which means that the blue bubbles should disappear by the calculation of the formula in Column C, although this only happens when you click on the “Edit Data” menu. It seems like that the formulas in Column C are not calculated with Apose.

The result PPT file is attached.

Thank you for helping us

Hi Weinacht,


Thank you for sharing the presentation file with us. I have observed the information shared by you for Column C values calculation. As far as your comments related to calculation of formula for series value in Column C is concerned, Aspose.Slides does not support automatic formula values calculation. At present, you may need to open chart in edit mode and then calculate every formula cell value manually. An issue with ID SLIDESJAVA-34897 has already been logged in our issue tracking system as new feature request. This thread has been linked with the issue so that you may be automatically notified once the feature will be available.

Many Thanks,

Hi,

When can we expect a solution for this ticket? Or is there any workaround, which is not manually opening the charts?
Thanks!

@AkosSzucs,

I regret to inform that the requested support is still unavailable in Aspose.Slides and unfortunately, there is no workaround I may offer you at the moment. I have requested our product team to share updates in this regard and will share the same with you as soon as it will be shared by them.

Thank you! I was wondering, if I would write a VBA macro which does the job, could we call that VBA macro code and run it with Aspose?

@AkosSzucs,

I suggest you to please visit documentation link, Presentation via VBA for your convenience.

Hi Mudassir,

We’ve passed another month. Could I get an update or at least an time estimate?

Thanks in advance! Appreciated.

Best regards,
Ákos

@AkosSzucs,

I have verified status from our issue tracking system and regret to share that at present the issue is blocked owing to missing implementation in Aspose.Slides for .NET. I have requested our product team to share further details in this regard and will share that with you as soon as they will be shared.

Hi,

Is there any news? At this point we need to know whether any .NET solution will be available in the coming months. We’ll need to look elsewhere for another solution which supports formulas in cells.

Thanks!

@AkosSzucs,

I have observed your comments. I regret to inform that issue is still blocked owing to missing implementations in Aspose.Slides for .NET. The tentative ETA is not earlier then 18.11 and most probably issue will be postponed all 2018 year due to heavy load and more priority issues.

Hello there I have a similar problem that I have to reevaluate the formulas of chart.
I looked a few topics to find a solution but didn’t find any.

At the moment my solution is to load the Workbook into Cells and reevaluate it and save it back into the Chart. Which is kinda overkill.
But this solutions implies that someone with that problem has a Slides AND a Cells licence.

public void Refresh()
        {
            var chartData = _chart.ChartData;
            MemoryStream recalculatedWorkbook;
            using (var currentWorkbook = chartData.ReadWorkbookStream())
            {
                recalculatedWorkbook = ReCalculator.RecCalculate(currentWorkbook);
            }
            
            using (recalculatedWorkbook)
            {
               chartData.WriteWorkbookStream(recalculatedWorkbook);
            }
        }
public static class ReCalculator
    {
        public static MemoryStream RecCalculate(Stream stream)
        {
            var wb = new Workbook(stream);
            wb.CalculateFormula();
            var memoryStream = new MemoryStream();
            wb.Save(memoryStream, SaveFormat.Xlsx);
            memoryStream.Position = 0;
            
            return memoryStream;
        }
    }

@jvoigtsolyp,

I regret to share that at present the requested support is unavailable in API. The solution proposed by you shall work in case when you have license for Aspose.Cells as well. We will share the good news with you as soon as the support will be available in Aspose.Slides as well.

The issues you have found earlier (filed as SLIDESJAVA-34897) have been fixed in this update.