30 this.externalLink = externalLink;
40 this.externalLink = externalLink ??
throw new ArgumentException(
"The external link cannot be null");
61 externalLink.AddWorksheet(worksheet);
62 currentWorksheet = worksheet;
73 currentWorksheet = externalLink.GetWorksheet(name);
88 EnsureCurrentWorksheet();
89 currentWorksheet.AddCell(address, value);
106 EnsureCurrentWorksheet();
107 currentWorksheet.AddCell(address, value, type);
114 private void EnsureCurrentWorksheet()
116 if (currentWorksheet ==
null)
118 throw new ArgumentException(
119 "No external worksheet is currently selected. " +
120 "Call AddWorksheet or UseWorksheet before adding cell data.");
Represents a cached cell of an external worksheet with an optional type.
DataType
Enum for the data type of the external cell.
ExternalLinkBuilder UseWorksheet(string name)
Selects an already declared external worksheet. The worksheet will be marked as currently used worksh...
ExternalLinkBuilder AddCell(string address, string value)
Adds or replaces a cached cell value (string representation) on the current worksheet.
ExternalLinkBuilder(string absoluteUri, string relativeUri=null)
Constructor with mandatory absolute URI and optional relative URI.
ExternalLinkBuilder AddWorksheet(string name)
Adds a worksheet to the external workbook definition and marks it as currently used worksheet in the ...
ExternalLinkBuilder AddCell(string address, string value, ExternalCellValue.DataType type)
Adds or replaces a cached cell value with specified type on the current worksheet.
ExternalLink Build()
Returns the configured external workbook link.
Represents a link to an external workbook.
Represents a worksheet declared by an external workbook link.