コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DocumentContext"/> class.
        /// </summary>
        /// <param name="document">Excel document.</param>
        /// <param name="documentMetadata">Document configuration metadata.</param>
        public DocumentContext(SpreadsheetDocument document, IExcelMetadata documentMetadata)
        {
            document.AssertArgumentNotNull(nameof(document));
            documentMetadata.AssertArgumentNotNull(nameof(documentMetadata));

            Document         = document;
            DocumentMetadata = documentMetadata;
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ExcelReportBuilder"/> class.
 /// </summary>
 /// <param name="document">Excel document.</param>
 /// <param name="documentMetadata">Default excel document metadata.</param>
 /// <param name="settings">Optional report builder settings.</param>
 public ExcelReportBuilder(
     SpreadsheetDocument document,
     ExcelDocumentMetadata?documentMetadata,
     IReportBuilderSettings?settings)
 {
     _documentMetadata = documentMetadata ?? new ExcelDocumentMetadata();
     _documentContext  = InitDocument(document.AssertArgumentNotNull(nameof(document)));
     _settings         = settings ?? new ReportBuilderSettings();
 }
コード例 #3
0
 public ExcelElement(SpreadsheetDocument doc, TOpenXmlElement data)
 {
     Doc  = doc.AssertArgumentNotNull(nameof(doc));
     Data = data;
 }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ExcelReportBuilder"/> class.
 /// </summary>
 /// <param name="document">Excel document.</param>
 /// <param name="documentMetadata">Default excel document metadata.</param>
 public ExcelReportBuilder(SpreadsheetDocument document, ExcelDocumentMetadata documentMetadata)
 {
     _documentMetadata = documentMetadata ?? new ExcelDocumentMetadata();
     _documentContext  = InitDocument(document.AssertArgumentNotNull(nameof(document)));
 }