CsvDataLoadOptions

CsvDataLoadOptions()

Initialisiert eine neue Instanz dieser Klasse mit Standardoptionen.

public CsvDataLoadOptions()

Beispiele

Zeigt, wie CSV als Datenquelle (Zeichenfolge) verwendet wird.

Document doc = new Document(MyDir + "Reporting engine template - CSV data destination.docx");

CsvDataLoadOptions loadOptions = new CsvDataLoadOptions(true);
loadOptions.Delimiter = ';';
loadOptions.CommentChar = '$';
loadOptions.HasHeaders = true;
loadOptions.QuoteChar = '"';

CsvDataSource dataSource = new CsvDataSource(MyDir + "List of people.csv", loadOptions);
BuildReport(doc, dataSource, "persons");

doc.Save(ArtifactsDir + "ReportingEngine.CsvDataString.docx");

Siehe auch


CsvDataLoadOptions(bool)

Initialisiert eine neue Instanz dieser Klasse und gibt in der ersten Zeile an, ob CSV-Daten Spaltennamen enthalten.

public CsvDataLoadOptions(bool hasHeaders)

Beispiele

Zeigt, wie CSV als Datenquelle (Zeichenfolge) verwendet wird.

Document doc = new Document(MyDir + "Reporting engine template - CSV data destination.docx");

CsvDataLoadOptions loadOptions = new CsvDataLoadOptions(true);
loadOptions.Delimiter = ';';
loadOptions.CommentChar = '$';
loadOptions.HasHeaders = true;
loadOptions.QuoteChar = '"';

CsvDataSource dataSource = new CsvDataSource(MyDir + "List of people.csv", loadOptions);
BuildReport(doc, dataSource, "persons");

doc.Save(ArtifactsDir + "ReportingEngine.CsvDataString.docx");

Siehe auch