We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Formula showing instead result on Excel 2016 32bits

Hi there,

if I open the Excel document with Excel 2016 32bits I see the formula instead of the result, then if I validate the cells by enter I see the result but for that I need to validate all the cells :(.

when I open the same Excel document with the Excel 2019 for example, I have no problems to see the result directly.

FYI I tested with Aspose.Cell 20.1 and 20.5 releases and it’s same problem.

Has anyone ever had the same problem?

2020-05-26_18-21-15.png (62.5 KB)
2020-05-26_18-21-50.png (103.1 KB)

@Christophe.do,

Thanks for the screenshots and details.

May be you have set Formulas Calculation options to “Manual” for your Excel 2016 (32bits), so you may try to set “Automatic” and then open the output file again. If you still find any issue, kindly do create a simple console application (runnable), zip the project and post us with sample files to reproduce such a file, we will check it soon.

Thank you for your answer Amjad :).

FYI, my project replace the target cell by name with the value instead from lots of data files, it’s not easy to made a console project, but you should know that if my Customer doesn’t edit the Template (cf) then the bug doesn’t appears, if my customer edit Excel Template with Excel 2016 32bit and put just a one char and save it, then the bug is coming.
If I take its Template and use it with the exe I Don’t have problem except if I open it with Excel 2016 32bits

PS:
My Customer works in big company and it’snt possible to update his Excel version

Please find attached (Template and result), may be help you to understand what is the problem.Excel_formula_bug.zip (184.5 KB)

It’s crasy !!

@Christophe.do,

Thanks for the sample files.

After simply evaluating the issue into older versions, it seems more like MS Excel (older versions) limitation or issue rather than a bug in Aspose.Cells. I can see you have also applied conditional formatting to those cells in the column. It would be hard to evaluate the issue based on these files as we would need sample project to reproduce the issue. We will still further check if we could find anything different with your files.

By the way, did you try your scenario to accomplish your tasks (to create such a file) using MS Excel 2016 32bit manually and check if you see the same issue when applying formula and conditional formatting at the same time?

Ok I understand

basically I use these lines code to insert a row and after substitute the target values, then I repeat until end of data file.

for (int i = row_min - 1; i <= row_max; i++)
{
sub_index++;
worksheet.Cells.InsertRow(mem_row_pos + sub_index);
worksheet.Cells.CopyRow(worksheet.Cells, i, mem_row_pos + sub_index);
}

And to respond at your question about manualy, it’snt necessary because if you select a row with formula you push the “enter” key and tada !!, the formula works :slight_smile: (in Excel 2016 of course)

Is this action compulsory when using MS Excel 2019?

Not necessary under Excel 2019, the cells are showing with result values directly

@Christophe.do,

We found the issue should be caused by the fact that your template file was created by higher version of MS Excel, such as, Excel2019. To make the generated file to be calculated automatically when opening in any version of MS Excel, you may add one line of code before saving the workbook:

            workbook.Settings.CalculationId = ""; // or “0” instead.
            workbook.Save(…);

this should fix your issue.

Let us know your feedback.

Hey Amjad,

Thanks for your help, I will test it tomorrow Morning and get back to you with the result.

Thank you again

@Christophe.do,

Sure, take your time to apply the suggested line of code. Hopefully, it will fix your issue.

Hello Amjad,

It works fine :slight_smile:, thank you very much for your help.

Bye and see you soon

@Christophe.do,

You are welcome and good to know that your issue is sorted out by the suggested line of code. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.