We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date


There is a excel template file with some formulas. 
First I use xlsIO to open the template in code.
Then I put some data into the template for the formulas and save the file in code behind. 
After that I open the excel file, but the formula not work, unless I focus on the data of cell and lost focus on the data of cell.
How can I let formulas run automatically use xlsIO.

3 Replies

JM Johnson Monohar M Syncfusion Team October 30, 2013 07:20 AM UTC

Hi Winson,

Thank you for using Syncfusion products.

There are two possibilities in a excel file for the reported manual calculation.

1. The "Calculation Option" in Formulas menu might be set to "Manual" instead of "Automatic"

   This can be rectified in XlsIO with the following code snippet.
   workbook.CalculationOptions.CalculationMode = ExcelCalculationMode.Automatic;

2. The generated excel file might be opened under protected mode. But, enabling the protection will perform calculation.

Kindly check the above points and get back to us with your sample by creating an incident from Direct Trac if the problem still exists.

Please let us know if you need any clarification.


WY Winson Yang October 31, 2013 03:39 AM UTC

Thanks for your reply.  
I had done everything as you said, but it doesn't work.
And I found the point is I put the value to IRange.Text, if I put the value to IRange.Value, then formula will work.

JM Johnson Monohar M Syncfusion Team November 7, 2013 05:59 AM UTC

Hi Winson,

Thank you for updating us.

The calculation part doesn't work if the cell type is text, which is a default behavior of MS Excel. It would be grateful if you could share us the sample in a new incident from Direct Trac to provide a prompt solution at the earliest.


Live Chat Icon For mobile
Up arrow icon