ErrorCheckOption

ErrorCheckOption class

Inställning för felkontroll tillämpas på vissa intervall.

public class ErrorCheckOption

Metoder

namnBeskrivning
AddRange(CellArea)Lägger till ett intervall som påverkas av denna inställning.
GetCountOfRange()Hämtar antalet intervall som påverkas av den här inställningen.
GetRange(int)Hämtar det påverkade området för denna inställning av ett givet index.
IsErrorCheck(ErrorCheckType)Kontrollerar om given feltyp kommer att kontrolleras.
RemoveRange(int)Tar bort ett intervall efter givet index.
SetErrorCheck(ErrorCheckType, bool)Anger om given feltyp ska kontrolleras.

Exempel


[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")
   

Se även