IRangeProvider.ValidateReference(String, ReferenceStyle) Method
Validates the cell reference in accordance with the specified cell reference style.
Namespace: DevExpress.Spreadsheet
Assembly: DevExpress.Spreadsheet.v24.1.Core.dll
NuGet Package: DevExpress.Spreadsheet.Core
Declaration
Parameters
Name | Type | Description |
---|---|---|
reference | String | A cell reference to be validated. |
style | ReferenceStyle | An enumeration member that specifies the cell reference style. |
Returns
Type | Description |
---|---|
Boolean | true, if the specified cell reference is valid; otherwise, false. |
Remarks
The example below shows how to use the ValidateReference method to check whether the specified cell references are valid.
worksheet.Range.ValidateReference("A1:C4", ReferenceStyle.A1); // returns true
worksheet.Range.ValidateReference("R[-5]C[4]:R1C[-2]", ReferenceStyle.R1C1); // returns true
worksheet.Range.ValidateReference("A1:B1:C1", ReferenceStyle.A1); // returns false
worksheet.Range.ValidateReference("Sheet1!R12C7", ReferenceStyle.R1C1); // returns false
See Also