-2

I am creating a windows application in C# .net to open an excel sheet and edit it. I am using excel automation in c# to do this.After editing/modifying some values in the sheet I will save the entire sheet in text file format. I am editing only one sheet and the sheet I am editing have formulas that have dependency on other sheet. So the formulas in the sheet are coming as #NAME?. When I save this excel sheet in .txt format I am getting the same error code instead of the formulas. I want the real formulas in my sheet and the text file.

Excel have an option to show the real formulas with the Formulas->Show Formulas.

I want the same to be done using the excel automation in c#

any suggestions

  • Please provide detail description your question with efforts done by you for that. Refer this http://stackoverflow.com/help/how-to-ask – Dikesh Gandhi Aug 21 '15 at 11:13

1 Answers1

1

The method you are looking for is DisplayFormulas on the Window object. For example:

ActiveWindow.DisplayFormulas = True
DavidG
  • 113,891
  • 12
  • 217
  • 223