Hi Team,
I am currently seeing formulas in the formula bar. I would like to see the calculated values instead of the formulas.
Attached a gif file for reference
formula view.gif (767.7 KB)
Cause
It seems that your worksheet is currently set to display formulas in the formula bar instead of their calculated values. This can happen if the worksheet is in a mode that shows formulas for debugging or review purposes.
Solution
To display the calculated values instead of the formulas, you can use the CalculateFormula method to ensure all formulas are evaluated and their results are displayed. Additionally, you can set the ShowFormulas property to false if it’s currently set to true.
Code
Here’s a simple example of how to achieve this in C#:
using Aspose.Cells;
class Program
{
static void Main()
{
// Create a workbook
Workbook workbook = new Workbook("your_file.xlsx");
// Access the first worksheet
Worksheet worksheet = workbook.Worksheets[0];
// Calculate all formulas in the workbook
workbook.CalculateFormula();
// Optionally, ensure formulas are not displayed
worksheet.ShowFormulas = false;
// Save the workbook
workbook.Save("updated_file.xlsx");
}
}
Next Steps
- Replace
"your_file.xlsx"with the path to your actual Excel file. - Run the code to calculate the formulas and save the updated workbook.
- Open the saved file to verify that it now displays the calculated values instead of the formulas.
If you have any further questions or need additional assistance, please let me know!
I am using grid js aspose cells for python via dot net , where I need to changes the configurations to hide the formuals and show the value
@sarathepiq
we follow the behavior like in MS excel.
currently we don’t have options to support it.
however we can support this requirement .
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): CELLSGRIDJS-1752
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.