Answer the question
In order to leave comments, you need to log in
How to clear Excel cell contents but keep formulas in C#?
I am making a converter and I need to fill in a large table with a bunch of formulas.
Accordingly, headings and formulas should be left, and the rest of the content should be deleted.
Tried this method:
this._sheetDestination.Range["A4", "A" + firstCellDestination.Row].EntireRow.Delete(XlDirection.xlUp);
this._sheetDestination.Range["A4", "A" + firstCellDestination.Row].EntireRow.Clear();
Answer the question
In order to leave comments, you need to log in
And if you loop through each cell from Range["A4", "A" + firstCellDestination.Row] and do not delete those that start with the "=" sign.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question