Struct OdfSpreadsheetFormula
- Namespace
- OdfKit.Spreadsheet
- Assembly
- OdfKit.dll
Represents an OpenFormula fragment that can be converted to a table:formula attribute.
表示可轉成 table:formula 屬性的 OpenFormula 公式片段。
public readonly struct OdfSpreadsheetFormula : IEquatable<OdfSpreadsheetFormula>
- Implements
- Inherited Members
Properties
Body
Gets the formula body without the of:= prefix.
取得不含 of:= 前綴的公式主體。
public string Body { get; }
Property Value
Methods
Add(OdfSpreadsheetFormula)
Creates an addition formula. 建立加法公式。
public OdfSpreadsheetFormula Add(OdfSpreadsheetFormula right)
Parameters
rightOdfSpreadsheetFormulaThe right operand. / 右側運算元。
Returns
- OdfSpreadsheetFormula
The formula fragment. / 公式片段。
Add(double)
Creates an addition formula. 建立加法公式。
public OdfSpreadsheetFormula Add(double right)
Parameters
rightdoubleThe right numeric value. / 右側數值。
Returns
- OdfSpreadsheetFormula
The formula fragment. / 公式片段。
Atom(string)
Creates an atomic formula fragment. 建立原子公式片段。
public static OdfSpreadsheetFormula Atom(string body)
Parameters
bodystringThe formula body. / 公式主體。
Returns
- OdfSpreadsheetFormula
The formula fragment. / 公式片段。
Divide(OdfSpreadsheetFormula)
Creates a division formula. 建立除法公式。
public OdfSpreadsheetFormula Divide(OdfSpreadsheetFormula right)
Parameters
rightOdfSpreadsheetFormulaThe right operand. / 右側運算元。
Returns
- OdfSpreadsheetFormula
The formula fragment. / 公式片段。
Equals(OdfSpreadsheetFormula)
Determines whether the current formula equals another formula. 判斷目前公式是否等於另一個公式。
public bool Equals(OdfSpreadsheetFormula other)
Parameters
otherOdfSpreadsheetFormulaThe other formula. / 另一個公式。
Returns
Equals(object?)
Performs equals. 執行 Equals。
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
Gets hash code. 取得 Hash Code。
public override int GetHashCode()
Returns
Multiply(OdfSpreadsheetFormula)
Creates a multiplication formula. 建立乘法公式。
public OdfSpreadsheetFormula Multiply(OdfSpreadsheetFormula right)
Parameters
rightOdfSpreadsheetFormulaThe right operand. / 右側運算元。
Returns
- OdfSpreadsheetFormula
The formula fragment. / 公式片段。
Multiply(double)
Creates a multiplication formula. 建立乘法公式。
public OdfSpreadsheetFormula Multiply(double right)
Parameters
rightdoubleThe right numeric value. / 右側數值。
Returns
- OdfSpreadsheetFormula
The formula fragment. / 公式片段。
Raw(string)
Creates a raw formula fragment and removes an optional of:= prefix.
建立原始公式片段,會移除選用的 of:= 前綴。
public static OdfSpreadsheetFormula Raw(string body)
Parameters
bodystringThe formula body. / 公式主體。
Returns
- OdfSpreadsheetFormula
The formula fragment. / 公式片段。
Reference(string)
Creates a cell or range reference. 建立儲存格或範圍參照。
public static OdfSpreadsheetFormula Reference(string address)
Parameters
addressstringThe cell or range address. / 儲存格或範圍位址。
Returns
- OdfSpreadsheetFormula
The formula fragment. / 公式片段。
Subtract(OdfSpreadsheetFormula)
Creates a subtraction formula. 建立減法公式。
public OdfSpreadsheetFormula Subtract(OdfSpreadsheetFormula right)
Parameters
rightOdfSpreadsheetFormulaThe right operand. / 右側運算元。
Returns
- OdfSpreadsheetFormula
The formula fragment. / 公式片段。
ToString()
Returns the formula string with the of:= prefix.
傳回包含 of:= 前綴的公式字串。
public override string ToString()
Returns
- string
The formula that can be written directly to
table:formula. / 可直接寫入table:formula的公式。
Operators
operator ==(OdfSpreadsheetFormula, OdfSpreadsheetFormula)
Determines whether two formulas are equal. 判斷兩個公式是否相等。
public static bool operator ==(OdfSpreadsheetFormula left, OdfSpreadsheetFormula right)
Parameters
leftOdfSpreadsheetFormulaThe left formula. / 左側公式。
rightOdfSpreadsheetFormulaThe right formula. / 右側公式。
Returns
implicit operator string(OdfSpreadsheetFormula)
Implicitly converts a formula fragment to a table:formula string.
將公式片段隱式轉換成 table:formula 字串。
public static implicit operator string(OdfSpreadsheetFormula formula)
Parameters
formulaOdfSpreadsheetFormulaThe formula fragment. / 公式片段。
Returns
operator !=(OdfSpreadsheetFormula, OdfSpreadsheetFormula)
Determines whether two formulas are not equal. 判斷兩個公式是否不相等。
public static bool operator !=(OdfSpreadsheetFormula left, OdfSpreadsheetFormula right)
Parameters
leftOdfSpreadsheetFormulaThe left formula. / 左側公式。
rightOdfSpreadsheetFormulaThe right formula. / 右側公式。