)
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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to retrieve cell value without enabling sheet calculations in C#, VB.NET?

Platform: WinForms |
Control: XlsIO |
Published Date: June 26, 2018 |
Last Revised Date: June 26, 2018

This article explains how to retrieve the cell value without enabling sheet calculations using XlsIO.

There can be situations where the formula value or the last calculated value in a cell is required without actually recalculating sheet formulas through EnableSheetCalculations. This can be achieved using DisplayText property in worksheet range.

The below table illustrates the behavior of DisplayText property with respect to enabling sheet calculations.

 

DisplayText while opening an existing workbook

DisplayText while creating a new workbook

Without EnableSheetCalculation

Always returns cell value with its number format.

Returns 0, if cell has a formula

Returns cell value with number format, if cell does not have formula

With EnableSheetCalculation

Returns evaluated value with number format, if cell has a formula

Returns cell value with number format, if cell does not have formula

Returns evaluated value with number format, if cell has a formula

 

Code snippet to use DisplayText property

Download input sample with data

Download complete sample

To know more about enabling and disabling sheet calculations, please refer the documentation.

The following complete code snippet explains how to retrieve the formula value in cell without enabling sheet calculations using XlsIO.

C#

VB

 

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon