CsvDataSource Class

Provides access to data of a CSV file or stream to be used while assembling a document.
Inheritance Hierarchy
SystemObject
  GroupDocs.Assembly.DataCsvDataSource

Namespace:  GroupDocs.Assembly.Data
Assembly:  GroupDocs.Assembly (in GroupDocs.Assembly.dll) Version: 20.8
Syntax
public class CsvDataSource

The CsvDataSource type exposes the following members.

Constructors
  NameDescription
Public methodCsvDataSource(Stream)
Creates a new data source with data from a CSV stream.
Public methodCsvDataSource(String)
Creates a new data source with data from a CSV file.
Public methodCsvDataSource(Stream, CsvDataLoadOptions)
Creates a new data source with data from a CSV stream.
Public methodCsvDataSource(String, CsvDataLoadOptions)
Creates a new data source with data from a CSV file.
Methods
  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Remarks

To access data of the corresponding file or stream while assembling a document, pass an instance of this class as a data source to one of DocumentAssembler.AssembleDocument overloads.

In template documents, a CsvDataSource instance should be treated in the same way as if it was a DataTable instance. For more information, see template syntax reference (https://docs.groupdocs.com/display/assemblynet/Template+Syntax+-+Part+1+of+2#TemplateSyntax-Part1of2-UsingDataSources).

Data types of comma-separated values are determined automatically upon their string representations. So in template documents, you can work with typed values rather than just strings. The engine is capable to automatically recognize values of the following types:

Note that for automatic recognition of data types to work, string representations of comma-separated values should be formed using invariant culture settings.

See Also