CommentChar

CsvDataLoadOptions.CommentChar property

Ottiene o imposta il carattere utilizzato per commentare le righe di dati CSV.

public char CommentChar { get; set; }

Osservazioni

Il valore predefinito è ‘#’ (cancelletto).

Esempi

Mostra come utilizzare CSV come origine dati (stringa).

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");

Guarda anche