Table of Contents

Class OdfDataValidationInfo

Namespace
OdfKit.Spreadsheet
Assembly
OdfKit.dll

Represents summary information for a data validation rule in a spreadsheet. 表示試算表中一筆資料驗證規則的摘要資訊。

public sealed class OdfDataValidationInfo
Inheritance
OdfDataValidationInfo
Inherited Members

Constructors

OdfDataValidationInfo(string, string, string?, string?, string?, IReadOnlyList<OdfCellRange>)

Represents summary information for a data validation rule in a spreadsheet. 表示試算表中一筆資料驗證規則的摘要資訊。

public OdfDataValidationInfo(string name, string conditionExpression, string? errorMessage, string? errorTitle, string? alertStyle, IReadOnlyList<OdfCellRange> appliedRanges)

Parameters

name string

The rule name from table:name. / 規則名稱(table:name)。

conditionExpression string

The original condition expression from table:condition. / 條件運算式原文(table:condition)。

errorMessage string

The error message content. / 錯誤訊息內容。

errorTitle string

The error message title. / 錯誤訊息標題。

alertStyle string

The alert style, such as stop, warning, or information. / 警告樣式(stopwarninginformation)。

appliedRanges IReadOnlyList<OdfCellRange>

The list of cell ranges to which this rule applies. / 套用此規則的儲存格範圍清單。

Properties

AlertStyle

Gets the alert style. 取得警告樣式。

public string? AlertStyle { get; }

Property Value

string

AppliedRanges

Gets the list of cell ranges to which this rule applies. 取得套用此規則的儲存格範圍清單。

public IReadOnlyList<OdfCellRange> AppliedRanges { get; }

Property Value

IReadOnlyList<OdfCellRange>

ConditionExpression

Gets the original condition expression. 取得條件運算式原文。

public string ConditionExpression { get; }

Property Value

string

ErrorMessage

Gets the error message content. 取得錯誤訊息內容。

public string? ErrorMessage { get; }

Property Value

string

ErrorTitle

Gets the error message title. 取得錯誤訊息標題。

public string? ErrorTitle { get; }

Property Value

string

Name

Gets the rule name. 取得規則名稱。

public string Name { get; }

Property Value

string

Methods

TryGetCondition(out OdfValidationCondition)

public bool TryGetCondition(out OdfValidationCondition condition)

Parameters

condition OdfValidationCondition

The condition type returned when parsing succeeds. / 解析成功時傳回的條件類型。

Returns

bool

true if the condition can be recognized. / 若可辨識則為 true