Class TemplateBinder
- Namespace
- OdfKit
- Assembly
- OdfKit.dll
Provides low-magic placeholder binding for common ODF document types. 提供常見 ODF 文件類型的低魔法占位符繫結。
public static class TemplateBinder
- Inheritance
-
TemplateBinder
- Inherited Members
Methods
Bind(DrawingDocument, IReadOnlyDictionary<string, object?>)
Replaces {{Name}} placeholders in drawing text boxes.
取代繪圖文件文字方塊中的 {{Name}} 占位符。
public static int Bind(DrawingDocument document, IReadOnlyDictionary<string, object?> values)
Parameters
documentDrawingDocumentThe drawing document. / 繪圖文件。
valuesIReadOnlyDictionary<string, object>The placeholder values. / 占位符值。
Returns
- int
The number of text paragraphs changed. / 已變更的文字段落數量。
Bind(DrawingDocument, IReadOnlyDictionary<string, object?>, OdfTemplateBindOptions?)
Replaces placeholders and expands collection paragraphs in drawing text boxes. 取代繪圖文字方塊中的占位符並展開集合段落。
public static OdfTemplateBindReport Bind(DrawingDocument document, IReadOnlyDictionary<string, object?> values, OdfTemplateBindOptions? options)
Parameters
documentDrawingDocumentThe drawing document. / 繪圖文件。
valuesIReadOnlyDictionary<string, object>The placeholder values. / 占位符值。
optionsOdfTemplateBindOptionsThe binding options. / 繫結選項。
Returns
- OdfTemplateBindReport
The binding report. / 繫結報告。
Bind(PresentationDocument, IReadOnlyDictionary<string, object?>)
Replaces {{Name}} placeholders in presentation text boxes.
取代簡報文字方塊中的 {{Name}} 占位符。
public static int Bind(PresentationDocument document, IReadOnlyDictionary<string, object?> values)
Parameters
documentPresentationDocumentThe presentation document. / 簡報文件。
valuesIReadOnlyDictionary<string, object>The placeholder values. / 占位符值。
Returns
- int
The number of text paragraphs changed. / 已變更的文字段落數量。
Bind(PresentationDocument, IReadOnlyDictionary<string, object?>, OdfTemplateBindOptions?)
Replaces placeholders and expands collection paragraphs in presentation text boxes. 取代簡報文字方塊中的占位符並展開集合段落。
public static OdfTemplateBindReport Bind(PresentationDocument document, IReadOnlyDictionary<string, object?> values, OdfTemplateBindOptions? options)
Parameters
documentPresentationDocumentThe presentation document. / 簡報文件。
valuesIReadOnlyDictionary<string, object>The placeholder values. / 占位符值。
optionsOdfTemplateBindOptionsThe binding options. / 繫結選項。
Returns
- OdfTemplateBindReport
The binding report. / 繫結報告。
Bind(SpreadsheetDocument, IReadOnlyDictionary<string, object?>)
Replaces {{Name}} placeholders in used spreadsheet cells.
取代試算表已使用儲存格中的 {{Name}} 占位符。
public static int Bind(SpreadsheetDocument document, IReadOnlyDictionary<string, object?> values)
Parameters
documentSpreadsheetDocumentThe spreadsheet document. / 試算表文件。
valuesIReadOnlyDictionary<string, object>The placeholder values. / 占位符值。
Returns
- int
The number of cells changed. / 已變更的儲存格數量。
Bind(SpreadsheetDocument, IReadOnlyDictionary<string, object?>, OdfTemplateBindOptions?)
Replaces placeholders and expands collection rows in a spreadsheet document. 取代試算表中的占位符並展開集合列。
public static OdfTemplateBindReport Bind(SpreadsheetDocument document, IReadOnlyDictionary<string, object?> values, OdfTemplateBindOptions? options)
Parameters
documentSpreadsheetDocumentThe spreadsheet document. / 試算表文件。
valuesIReadOnlyDictionary<string, object>The placeholder values. / 占位符值。
optionsOdfTemplateBindOptionsThe binding options. / 繫結選項。
Returns
- OdfTemplateBindReport
The binding report. / 繫結報告。
Bind(TextDocument, IReadOnlyDictionary<string, object?>)
Replaces {{Name}} placeholders in a text document.
取代文字文件中的 {{Name}} 占位符。
public static int Bind(TextDocument document, IReadOnlyDictionary<string, object?> values)
Parameters
documentTextDocumentThe text document. / 文字文件。
valuesIReadOnlyDictionary<string, object>The placeholder values. / 占位符值。
Returns
- int
The number of replacement operations requested. / 要求執行的替換作業數量。
Bind(TextDocument, IReadOnlyDictionary<string, object?>, OdfTemplateBindOptions?)
Replaces placeholders and expands collection paragraphs in a text document. 取代文字文件中的占位符並展開集合段落。
public static OdfTemplateBindReport Bind(TextDocument document, IReadOnlyDictionary<string, object?> values, OdfTemplateBindOptions? options)
Parameters
documentTextDocumentThe text document. / 文字文件。
valuesIReadOnlyDictionary<string, object>The placeholder values. / 占位符值。
optionsOdfTemplateBindOptionsThe binding options. / 繫結選項。
Returns
- OdfTemplateBindReport
The binding report. / 繫結報告。