2010-06-07 68 views
1

我知道有一种方式来获得在VBA错误细胞如下发现错误的Excel单元格

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

任何一个可以提供给我在C#中做到这一点的方式。

基本上得到所有的是,如在公式中的错误的细胞(#DIV/0!,#REF!)范围

回答

2

我知道了......

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