Interface ICsvExporter
- Namespace
- NuvTools.Report.Sheet.Csv
- Assembly
- NuvTools.Report.dll
Exports documents to CSV format encoded as base64 strings.
public interface ICsvExporter
Methods
ExportFirstSheetToCsv(Document, CsvDelimiter, string?, bool, bool)
Exports the first table in a document to a CSV file encoded as a base64 string.
string ExportFirstSheetToCsv(Document document, CsvDelimiter delimiter = CsvDelimiter.Comma, string? customDelimiter = null, bool includeHeader = true, bool sanitizeDelimiter = true)
Parameters
documentDocumentThe document containing the table to export.
delimiterCsvDelimiterThe delimiter to use. Defaults to Comma.
customDelimiterstringA custom delimiter string, required when
delimiteris Custom.includeHeaderboolWhether to include the header row with column labels. Defaults to
true.sanitizeDelimiterboolWhether to remove occurrences of the delimiter from header labels and cell values to prevent CSV corruption. Defaults to
true.
Returns
- string
A base64-encoded CSV string of the first table.
ExportToCsv(Document, CsvDelimiter, string?, bool, bool)
Exports all tables in a document to separate CSV files encoded as base64 strings.
List<string> ExportToCsv(Document document, CsvDelimiter delimiter = CsvDelimiter.Comma, string? customDelimiter = null, bool includeHeader = true, bool sanitizeDelimiter = true)
Parameters
documentDocumentThe document containing tables to export.
delimiterCsvDelimiterThe delimiter to use. Defaults to Comma.
customDelimiterstringA custom delimiter string, required when
delimiteris Custom.includeHeaderboolWhether to include the header row with column labels. Defaults to
true.sanitizeDelimiterboolWhether to remove occurrences of the delimiter from header labels and cell values to prevent CSV corruption. Defaults to
true.