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

XlsIO Getting cell.DisplayText takes a lot of time.


I use Syncfusion.XlsIO in such scenario:

1. Read template .xlsx file. The file contains first sheet with TemplateMarkers to fill row data and second sheet with formulas to perform calculations.
2. Enable formula calculations by call ws.EnableSheetCalculations();

3. Fill data to ITemplateMarkersProcessor

At this moment I suppose all formulas in the second sheet are calculated.

After that I need to take calculated values from sheet with formulas. I iterate over worksheet.Cells and try to take cell.DisplayText

Unfortunately, I found that cell.DisplayText takes more 90% of time. You can see this in attached trace screenshot.

As I understood from trace analysis the reason of this behaviour is that during getting cell.DisplayText Syncfusion.XlsIO starts formulas recalculation. But I suppose formulas already calculated.

Tell me please any idea how I can read fast already calculated values from the second sheet without starting recalc in every cell.DisplayText call.

Thank you,

Attachment: GetDisplayText_1128cd62.zip

1 Reply

MC Mohan Chandran Syncfusion Team October 3, 2019 01:43 PM UTC

Hi Mikhail, 

Greetings from Syncfusion. 

When IWorksheet.EnableSheetCalculations() method is invoked, only the CalcEngine and required instances are created. The actual formula calculation starts only when you access the DispalyText or CalculatedValue property of the cell.  

We request you to share the Excel document used at your end, with data filled using Template Marker. This will be helpful for us to validate further to find the root cause of the issue from our side and provide prompt solution at the earliest. 


Live Chat Icon For mobile
Up arrow icon