开发者

finding Excel Error Cells in C#

开发者 https://www.devze.com 2023-01-02 18:12 出处:网络
I know there is a way to get the Error cells in VBA as below Set rng = xlBook1.Sheets(s1).UsedRange.SpecialCells(xlCellTypeFormulas, xlErrors)

I know there is a way to get the Error cells in VBA as below

Set rng = xlBook1.Sheets(s1).UsedRange.SpecialCells(xlCellTypeFormulas, xlErrors)

can any one provide me the way to do this in C#.

basical开发者_运维问答ly to get all the cells that is having errors in the formula like (#DIV/0!, #REF!) in a range


I got it...

rngTemp = (Excel.Range)wsCTAWK13.UsedRange.SpecialCells(Excel.XlCellType.xlCellTypeFormulas, Excel.XlSpecialCellsValue.xlErrors);

0

精彩评论

暂无评论...
验证码 换一张
取 消