Delimiter

CsvDataLoadOptions.Delimiter property

Ruft das Zeichen ab, das als Spaltentrennzeichen verwendet werden soll, oder legt es fest.

public char Delimiter { get; set; }

Bemerkungen

Der Standardwert ist ‘,’ (Komma).

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