forked from ClosedXML/ClosedXML
-
Notifications
You must be signed in to change notification settings - Fork 0
/
IXLDataValidation.cs
76 lines (66 loc) · 2.83 KB
/
IXLDataValidation.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
using System;
using System.Collections.Generic;
namespace ClosedXML.Excel
{
public enum XLErrorStyle { Stop, Warning, Information }
public enum XLAllowedValues { AnyValue, WholeNumber, Decimal, Date, Time, TextLength, List, Custom }
public enum XLOperator { EqualTo, NotEqualTo, GreaterThan, LessThan, EqualOrGreaterThan, EqualOrLessThan, Between, NotBetween }
public interface IXLDataValidation
{
/// <summary>
/// A collection of ranges the data validation rule applies too.
/// </summary>
IEnumerable<IXLRange> Ranges { get; }
/// <summary>
/// Add a range to the collection of ranges this rule applies to.
/// If the specified range does not belong to the worksheet of the data validation
/// rule it is transferred to the target worksheet.
/// </summary>
/// <param name="range">A range to add.</param>
void AddRange(IXLRange range);
/// <summary>
/// Add a collection of ranges to the collection of ranges this rule applies to.
/// Ranges that do not belong to the worksheet of the data validation
/// rule are transferred to the target worksheet.
/// </summary>
/// <param name="ranges">Ranges to add.</param>
void AddRanges(IEnumerable<IXLRange> ranges);
/// <summary>
/// Detach data validation rule of all ranges it applies to.
/// </summary>
void ClearRanges();
/// <summary>
/// Remove the specified range from the collection of range this rule applies to.
/// </summary>
/// <param name="range">A range to remove.</param>
bool RemoveRange(IXLRange range);
//void Delete();
//void CopyFrom(IXLDataValidation dataValidation);
Boolean ShowInputMessage { get; set; }
Boolean ShowErrorMessage { get; set; }
Boolean IgnoreBlanks { get; set; }
Boolean InCellDropdown { get; set; }
String InputTitle { get; set; }
String InputMessage { get; set; }
String ErrorTitle { get; set; }
String ErrorMessage { get; set; }
XLErrorStyle ErrorStyle { get; set; }
XLAllowedValues AllowedValues { get; set; }
XLOperator Operator { get; set; }
String Value { get; set; }
String MinValue { get; set; }
String MaxValue { get; set; }
XLWholeNumberCriteria WholeNumber { get; }
XLDecimalCriteria Decimal { get; }
XLDateCriteria Date { get; }
XLTimeCriteria Time { get; }
XLTextLengthCriteria TextLength { get; }
void List(String list);
void List(String list, Boolean inCellDropdown);
void List(IXLRange range);
void List(IXLRange range, Boolean inCellDropdown);
void Custom(String customValidation);
void Clear();
Boolean IsDirty();
}
}