Table of Contents

Method FromXlsx

Namespace
DocWright.MailMerge
Assembly
DocWright.MailMerge.dll

FromXlsx(Stream, string?, int)

A recipient list from an Excel workbook (Phase 167): a sheet's first row names the fields (XlsxMergeData).

public static IMergeDataReader FromXlsx(Stream workbook, string? sheet = null, int maxRecords = 0)

Parameters

workbook Stream

The workbook (.xlsx).

sheet string

The sheet's name; null for the first sheet.

maxRecords int

The most records read; 0 for DefaultMaxRecords.

Returns

IMergeDataReader

The reader.

Exceptions

ArgumentNullException

workbook is null.

ArgumentException

The workbook has no sheet of that name.

InvalidDataException

The stream is not a workbook this reader reads.