## ErrorCheckOption class

应用于特定范围的错误检查设置。

```csharp
public class ErrorCheckOption
```

## 方法

| 姓名 | 描述 |
| --- | --- |
| [AddRange](../../aspose.cells/errorcheckoption/addrange)(CellArea) | 增加一个受此设置影响的范围。 |
| [GetCountOfRange](../../aspose.cells/errorcheckoption/getcountofrange)() | 获取受此设置影响的范围计数。 |
| [GetRange](../../aspose.cells/errorcheckoption/getrange)(int) | 通过给定索引获取此设置的影响范围。 |
| [IsErrorCheck](../../aspose.cells/errorcheckoption/iserrorcheck)(ErrorCheckType) | 检查是否将检查给定的错误类型。 |
| [RemoveRange](../../aspose.cells/errorcheckoption/removerange)(int) | 按给定索引删除一个范围。 |
| [SetErrorCheck](../../aspose.cells/errorcheckoption/seterrorcheck)(ErrorCheckType, bool) | 设置是否检查给定的错误类型。 |

### 例子

```csharp

[C#]

  Workbook workbook = new Workbook();
  ErrorCheckOptionCollection opts = workbook.Worksheets[0].ErrorCheckOptions;
  int optionIdx = opts.Add();
  ErrorCheckOption opt = opts[optionIdx];
  opt.SetErrorCheck(Aspose.Cells.ErrorCheckType.InconsistFormula, false);
  opt.SetErrorCheck(Aspose.Cells.ErrorCheckType.InconsistRange, false);
  opt.SetErrorCheck(Aspose.Cells.ErrorCheckType.TextDate, false);
  opt.SetErrorCheck(Aspose.Cells.ErrorCheckType.TextNumber, false);
  opt.SetErrorCheck(Aspose.Cells.ErrorCheckType.Validation, false);
  opt.AddRange(CellArea.CreateCellArea("A1", "B10"));
  workbook.Save(@"Book1.xlsx");
  
[Visual Basic]

   Dim workbook As Workbook = New Workbook()
   Dim opts As ErrorCheckOptionCollection = workbook.Worksheets(0).ErrorCheckOptions
   Dim optionIdx As Integer = opts.Add()
   Dim opt As ErrorCheckOption = opts(optionIdx)
   opt.SetErrorCheck(Aspose.Cells.ErrorCheckType.InconsistFormula, False)
   opt.SetErrorCheck(Aspose.Cells.ErrorCheckType.InconsistRange, False)
   opt.SetErrorCheck(Aspose.Cells.ErrorCheckType.TextDate, False)
   opt.SetErrorCheck(Aspose.Cells.ErrorCheckType.TextNumber, False)
   opt.SetErrorCheck(Aspose.Cells.ErrorCheckType.Validation, False)
   opt.AddRange(CellArea.CreateCellArea("A1", "B10"))
   workbook.Save("Book1.xlsx")
   
```

### 也可以看看

* 命名空间 [Aspose.Cells](../../aspose.cells)
* 部件 [Aspose.Cells](../../)

<!-- DO NOT EDIT: generated by xmldocmd for Aspose.Cells.dll -->
