Exporting to PDF from Excel Changes the Formulas I have Specified at Runtime

Dear All,


Basically, I have been trying to make my C# program use Excel’s NORMDIST(x, mean, st.dev, cumulative) function on an Excel template than I have already generated, to generate a point on a graph, and I seem to be having a problem with Aspose when it exports the Excel to PDF.

For example;
//Values have been input into the Workbook

sheet1.Cells[“A1”].Formula = “=NormDist(B1, A2, A3, False)”;
Workbook.CalculateFormula();

//Export Excel to PDF

When the excel is the exported to PDF, the values become Cumulative (changing the False to True in the formula), and I have no idea why this happens?

I put a break point before it exports to see if it was Workbook.CalculateFormula() that calculated the value incorrectly but when I look at the values in the PDF document they are cumulative.

Please help, many thanks.

PS. Here is a link to my other similar post incase it gets a response and this one doesn’t.
http://www.aspose.com/community/forums/418222/pdf-export-changes-values-of-my-formulas-at-export-time-cross-post-from-aspose.cells/showthread.aspx#418222

Hi,

Please download and try this latest fix/version: Aspose.Cells for .NET v7.3.2.3 and let us know your feedback if it works fine with it.


If you still find the issue, kindly attach the template Excel file and PDF file to show the issue. You may save the workbook to Excel and PDF formats (using Aspose.Cells for .NET v7.3.2.3) and provide them here, we will test your case / issue soon.

Thank you.

Hi,


Thanks for sharing the template files in your other thread: https://forum.aspose.com/t/103797

After an initial test, I can notice the issue as you have mentioned. The calculated value in the G23 cell is rendered as we have put “TRUE” (which we did not) for the formula i.e…, “=NORMDIST($F$23,$D$1,$F$1,FALSE)” in the first worksheet of your template file. Also, due to this, the graph is also not rendered fine.

Sample code:
Workbook wb = new Workbook(@“e:\test2\Template.xls”);
wb.Worksheets[0].Cells[“F23”].PutValue(120);
wb.CalculateFormula();
wb.Save(“e:\test2\Template1.pdf”);

I have logged a ticket with an id: CELLSNET-41133 for your issue. We will look into your issue and figure it out soon.

Thank you.

Hi,

We have fixed this issue.

Please download and try this fix: Aspose.Cells for .NET v7.3.2.4 and let us know your feedback.

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


This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(1)