Table of Contents

Class OdfObjectColumnMapping

Namespace
OdfKit.Spreadsheet
Assembly
OdfKit.dll

Defines one object property to spreadsheet column mapping. 定義單一物件屬性與試算表欄位的對應。

public sealed class OdfObjectColumnMapping
Inheritance
OdfObjectColumnMapping
Inherited Members

Remarks

Initializes a new instance of the OdfObjectColumnMapping class. 初始化 OdfObjectColumnMapping 類別的新執行個體。

Constructors

OdfObjectColumnMapping(string)

Defines one object property to spreadsheet column mapping. 定義單一物件屬性與試算表欄位的對應。

public OdfObjectColumnMapping(string propertyName)

Parameters

propertyName string

The property name. / 屬性名稱。

Remarks

Initializes a new instance of the OdfObjectColumnMapping class. 初始化 OdfObjectColumnMapping 類別的新執行個體。

Properties

Aliases

Gets header aliases used when reading objects. 取得讀取物件時使用的標題別名。

public IList<string> Aliases { get; }

Property Value

IList<string>

DefaultValue

Gets or sets the default value used when the cell is empty. 取得或設定儲存格為空時使用的預設值。

public object? DefaultValue { get; set; }

Property Value

object

DefaultValueFactory

Gets or sets the default value factory used when the cell is empty. 取得或設定儲存格為空時使用的預設值工廠。

public Func<object?>? DefaultValueFactory { get; set; }

Property Value

Func<object>

Format

Gets or sets the column formatting options. 取得或設定欄位格式選項。

public OdfObjectColumnFormat? Format { get; set; }

Property Value

OdfObjectColumnFormat

Header

Gets or sets the header name. 取得或設定標題名稱。

public string? Header { get; set; }

Property Value

string

Ignore

Gets or sets whether the property is ignored. 取得或設定是否忽略此屬性。

public bool Ignore { get; set; }

Property Value

bool

Order

Gets or sets the optional column order. 取得或設定選用欄位順序。

public int? Order { get; set; }

Property Value

int?

PropertyName

Gets the property name. 取得屬性名稱。

public string PropertyName { get; }

Property Value

string

RequiredColumn

Gets or sets whether the spreadsheet column is required. 取得或設定是否需要此試算表欄位。

public bool RequiredColumn { get; set; }

Property Value

bool

RequiredValue

Gets or sets whether cell values for this property are required. 取得或設定此屬性的儲存格值是否必填。

public bool RequiredValue { get; set; }

Property Value

bool