CsvDataLoadOptions Class
Wordize.Reporting.CsvDataLoadOptions class. Represents options for parsing CSV data.
CsvDataLoadOptions class
Represents options for parsing CSV data.
public class CsvDataLoadOptions
Constructors
Name | Description |
---|---|
CsvDataLoadOptions() | Initializes a new instance of this class with default options. |
CsvDataLoadOptions(bool) | Initializes a new instance of this class with specifying whether CSV data contains column names at the first line. |
Properties
Name | Description |
---|---|
CommentChar { get; set; } | Gets or sets the character that is used to comment lines of CSV data. |
Delimiter { get; set; } | Gets or sets the character to be used as a column delimiter. |
HasHeaders { get; set; } | Gets or sets a value indicating whether the first record of CSV data contains column names. |
QuoteChar { get; set; } | Gets or sets the character that is used to quote field values. |
Examples
Shows how to fill template with data from CSV data source loaded from stream using LINQ Reporting engine.
string csvString = "Name,Position\r\nJames Bond,Spy";
CsvDataLoadOptions csvLoadOptions = new CsvDataLoadOptions() { HasHeaders = true };
CsvDataSource ds = new CsvDataSource(new MemoryStream(Encoding.UTF8.GetBytes(csvString)), csvLoadOptions);
ReportBuilder.BuildReport(MyDir + "ReportingTemplateForeach.docx", ArtifactsDir + "ReportingForeachCsvDataSource.docx", ds, "data");
See Also
- namespace Wordize.Reporting
- assembly Wordize