Class OdfPivotTableInfo
- Namespace
- OdfKit.Spreadsheet
- Assembly
- OdfKit.dll
Represents summary information for a pivot table in a spreadsheet. 表示試算表中一個樞紐分析表的摘要資訊。
public sealed class OdfPivotTableInfo
- Inheritance
-
OdfPivotTableInfo
- Inherited Members
Constructors
OdfPivotTableInfo(string, string, string, string, bool, bool, IReadOnlyList<OdfPivotTableFieldInfo>, IReadOnlyList<OdfPivotTableSortFieldInfo>, IReadOnlyList<OdfPivotTableFilterConditionInfo>)
Represents summary information for a pivot table in a spreadsheet. 表示試算表中一個樞紐分析表的摘要資訊。
public OdfPivotTableInfo(string sheetName, string name, string sourceRangeAddress, string targetRangeAddress, bool hasColumnHeaders, bool hasRowHeaders, IReadOnlyList<OdfPivotTableFieldInfo> fields, IReadOnlyList<OdfPivotTableSortFieldInfo> sortFields, IReadOnlyList<OdfPivotTableFilterConditionInfo> filterConditions)
Parameters
sheetNamestringThe containing sheet name. / 所在工作表名稱。
namestringThe pivot table name from
table:name. / 樞紐分析表名稱(table:name)。sourceRangeAddressstringThe source data range address from
table:cell-range-addressundertable:source-cell-range. / 來源資料範圍位址(table:source-cell-range的table:cell-range-address)。targetRangeAddressstringThe target output range start from
table:target-range-address. / 目標輸出範圍起點(table:target-range-address)。hasColumnHeadersboolWhether the source has column headers. / 來源是否含欄標題。
hasRowHeadersboolWhether the source has row headers. / 來源是否含列標題。
fieldsIReadOnlyList<OdfPivotTableFieldInfo>The field setting list. / 欄位設定清單。
sortFieldsIReadOnlyList<OdfPivotTableSortFieldInfo>The sort field list. / 排序欄位清單。
filterConditionsIReadOnlyList<OdfPivotTableFilterConditionInfo>The filter condition list. / 篩選條件清單。
Properties
Fields
Gets the field setting list. 取得欄位設定清單。
public IReadOnlyList<OdfPivotTableFieldInfo> Fields { get; }
Property Value
FilterConditions
Gets the filter condition list. 取得篩選條件清單。
public IReadOnlyList<OdfPivotTableFilterConditionInfo> FilterConditions { get; }
Property Value
HasColumnHeaders
Gets whether the source has column headers. 取得來源是否含欄標題。
public bool HasColumnHeaders { get; }
Property Value
HasRowHeaders
Gets whether the source has row headers. 取得來源是否含列標題。
public bool HasRowHeaders { get; }
Property Value
Name
Gets the pivot table name. 取得樞紐分析表名稱。
public string Name { get; }
Property Value
SheetName
Gets the containing sheet name. 取得所在工作表名稱。
public string SheetName { get; }
Property Value
SortFields
Gets the sort field list. 取得排序欄位清單。
public IReadOnlyList<OdfPivotTableSortFieldInfo> SortFields { get; }
Property Value
SourceRangeAddress
Gets the source data range address string. 取得來源資料範圍位址字串。
public string SourceRangeAddress { get; }
Property Value
TargetRangeAddress
Gets the target output range start address string. 取得目標輸出範圍起點位址字串。
public string TargetRangeAddress { get; }
Property Value
Methods
TryGetSourceRange(out OdfCellRange)
Attempts to parse SourceRangeAddress as an OdfCellRange. 嘗試將 SourceRangeAddress 解析為 OdfCellRange。
public bool TryGetSourceRange(out OdfCellRange range)
Parameters
rangeOdfCellRangeThe cell range returned when parsing succeeds. / 解析成功時傳回的儲存格範圍。
Returns
TryGetTargetStart(out OdfCellAddress)
Attempts to parse TargetRangeAddress as the starting OdfCellAddress. 嘗試將 TargetRangeAddress 解析為起點 OdfCellAddress。
public bool TryGetTargetStart(out OdfCellAddress address)
Parameters
addressOdfCellAddressThe cell address returned when parsing succeeds. / 解析成功時傳回的儲存格位址。
Returns
Remarks
According to the ODF 1.4 schema, table:target-range-address has the cellRangeAddress type. This method first tries to parse the value as a range and returns its start; if the string uses a single-cell address format, such as documents written by earlier versions, it falls back to parsing a single address for backward compatibility.
依 ODF 1.4 schema,table:target-range-address 的型別為 cellRangeAddress
(範圍),此方法會優先嘗試以範圍格式解析並取其起點;若該字串為單一儲存格位址格式
(例如舊版本寫入的文件),則回退以單一位址格式解析,以維持向下相容。