public void Add( DataValidationRule rule, WorksheetReferenceCollection references, bool overwriteExistingRules )
| Exception | Description |
|---|---|
| System.ArgumentNullException | Occurs when rule is null. |
| System.ArgumentNullException | Occurs when references is null. |
| System.ArgumentException | Occurs when the references are from a worksheet other than this collection. |
| System.ArgumentException | Occurs when the rule already applied to another worksheet. |
| System.ArgumentException | Occurs when the rule is invalid based on its rule type's requirements. |
| System.ArgumentException | Occurs when overwriteExistingRules is False and the one or more of the cells in the references collection already have a data validation rule applied to it. |
| System.ArgumentException | Occurs when the one or more of the cells in the references collection are in the totals row of a table. |
Target Platforms: Android 4.4+, iOS 8+
Development Environments: Visual Studio 2015+, Visual Studio for Mac Preview, Xamarin for Visual Studio 4.2+