Table of Contents

Method FromCsv

Namespace
DocWright.MailMerge
Assembly
DocWright.MailMerge.dll

FromCsv(TextReader, char, int)

Opens a reader over a recipient list in CSV, read as Word's Mailings reads one (Read(TextReader, char, int), Phase 161, WQ-0134): the first row names the fields, Word's way.

public static IMergeDataReader FromCsv(TextReader reader, char delimiter = ',', int maxRecords = 0)

Parameters

reader TextReader

The text.

delimiter char

The field delimiter.

maxRecords int

The most records read (0: no limit).

Returns

IMergeDataReader

The reader, positioned before the first record.

Exceptions

ArgumentNullException

reader is null.

FormatException

The list is empty or malformed.