API Reference
ExcelSheetCsvExtensions
Imports and exports worksheet data through the shared OfficeIMO.CSV pipeline.
Inheritance
- Object
- ExcelSheetCsvExtensions
Methods
public static ExcelCsvImportResult ImportCsv(ExcelSheet sheet, CsvDocument csv, ExcelCsvImportOptions options = null, CancellationToken cancellationToken = default) #ExcelCsvImportResultImports a loaded CSV document into an existing worksheet.
Parameters
- arg1 OfficeIMO.Excel.ExcelSheet
- arg2 OfficeIMO.CSV.CsvDocument
- arg3 OfficeIMO.Excel.Csv.ExcelCsvImportOptions = null
- arg4 System.Threading.CancellationToken = default
public static ExcelCsvImportResult ImportCsv(ExcelSheet sheet, Stream stream, ExcelCsvImportOptions options = null, CancellationToken cancellationToken = default) #ExcelCsvImportResultReads a caller-owned CSV stream and imports it into an existing worksheet.
Parameters
- arg1 OfficeIMO.Excel.ExcelSheet
- arg2 System.IO.Stream
- arg3 OfficeIMO.Excel.Csv.ExcelCsvImportOptions = null
- arg4 System.Threading.CancellationToken = default
public static ExcelCsvImportResult ImportCsvFile(ExcelSheet sheet, String path, ExcelCsvImportOptions options = null, CancellationToken cancellationToken = default) #ExcelCsvImportResultOpens a CSV file and imports it into an existing worksheet.
Parameters
- sheet OfficeIMO.Excel.ExcelSheet
- path System.String
- options OfficeIMO.Excel.Csv.ExcelCsvImportOptions = null
- cancellationToken System.Threading.CancellationToken = default
public static ExcelCsvImportResult ImportCsvText(ExcelSheet sheet, String text, ExcelCsvImportOptions options = null, CancellationToken cancellationToken = default) #ExcelCsvImportResultParses CSV text and imports it into an existing worksheet. Because the input is already decoded, Encoding applies only to file and stream imports.
Parameters
- sheet OfficeIMO.Excel.ExcelSheet
- text System.String
- options OfficeIMO.Excel.Csv.ExcelCsvImportOptions = null
- cancellationToken System.Threading.CancellationToken = default
public static Void SaveAsCsv(ExcelSheet sheet, String path, Boolean headersInFirstRow = true, CsvSaveOptions csvOptions = null, ExcelReadOptions readOptions = null, CancellationToken cancellationToken = default) #VoidSaves the worksheet used range as CSV.
Parameters
- arg1 OfficeIMO.Excel.ExcelSheet
- arg2 System.String
- arg3 System.Boolean = true
- arg4 OfficeIMO.CSV.CsvSaveOptions = null
- arg5 OfficeIMO.Excel.ExcelReadOptions = null
- arg6 System.Threading.CancellationToken = default
public static Void SaveAsCsv(ExcelSheet sheet, Stream stream, Boolean headersInFirstRow = true, CsvSaveOptions csvOptions = null, ExcelReadOptions readOptions = null, CancellationToken cancellationToken = default) #VoidSaves the worksheet used range to a caller-owned CSV stream.
Parameters
- arg1 OfficeIMO.Excel.ExcelSheet
- arg2 System.IO.Stream
- arg3 System.Boolean = true
- arg4 OfficeIMO.CSV.CsvSaveOptions = null
- arg5 OfficeIMO.Excel.ExcelReadOptions = null
- arg6 System.Threading.CancellationToken = default
public static String ToCsv(ExcelSheet sheet, Boolean headersInFirstRow = true, CsvSaveOptions csvOptions = null, ExcelReadOptions readOptions = null, CancellationToken cancellationToken = default) #StringConverts the worksheet used range to CSV text.
Parameters
- sheet OfficeIMO.Excel.ExcelSheet
- headersInFirstRow System.Boolean = true
- csvOptions OfficeIMO.CSV.CsvSaveOptions = null
- readOptions OfficeIMO.Excel.ExcelReadOptions = null
- cancellationToken System.Threading.CancellationToken = default
public static String ToCsv(ExcelSheet sheet, String a1Range, Boolean headersInFirstRow = true, CsvSaveOptions csvOptions = null, ExcelReadOptions readOptions = null, CancellationToken cancellationToken = default) #StringConverts an A1 worksheet range to CSV text.
Parameters
- sheet OfficeIMO.Excel.ExcelSheet
- a1Range System.String
- headersInFirstRow System.Boolean = true
- csvOptions OfficeIMO.CSV.CsvSaveOptions = null
- readOptions OfficeIMO.Excel.ExcelReadOptions = null
- cancellationToken System.Threading.CancellationToken = default
public static CsvDocument ToCsvDocument(ExcelSheet sheet, Boolean headersInFirstRow = true, ExcelReadOptions readOptions = null, CancellationToken cancellationToken = default) #CsvDocumentConverts the worksheet used range to a materialized CSV document.
Parameters
- sheet OfficeIMO.Excel.ExcelSheet
- headersInFirstRow System.Boolean = true
- readOptions OfficeIMO.Excel.ExcelReadOptions = null
- cancellationToken System.Threading.CancellationToken = default
public static CsvDocument ToCsvDocument(ExcelSheet sheet, String a1Range, Boolean headersInFirstRow = true, ExcelReadOptions readOptions = null, CancellationToken cancellationToken = default) #CsvDocumentConverts an A1 worksheet range to a materialized CSV document.
Parameters
- sheet OfficeIMO.Excel.ExcelSheet
- a1Range System.String
- headersInFirstRow System.Boolean = true
- readOptions OfficeIMO.Excel.ExcelReadOptions = null
- cancellationToken System.Threading.CancellationToken = default
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object