To import a worksheet from an CSV (comma-separated values) file, create an instance of the CsvImporter class, set the appropriate properties and call the Import method. The Quote and Separator properties can be used to specify the quote and separator characters respectively in the imported file. The CsvImportForm (found in the MindFusion.Spreadsheet.Wpf.StandardForms.dll assembly) can be used to facilitate the import from CSV.
The following example illustrates how to import a worksheet from an CSV file:
C# Copy Code |
---|
var csvImporter = new CsvImporter(); |
Visual Basic Copy Code |
---|
Dim csvImporter As New CsvImporter() |
To import a workbook from an ODS (OpenDocument) file, create an instance of the CalcImporter class and call the Import method. The following example illustrates how to do this:
C# Copy Code |
---|
var calcImporter = new CalcImporter(); |
Visual Basic Copy Code |
---|
Dim calcImporter As New CalcImporter() |
To import a workbook from an XLSX (Office Open XML) file, create an instance of the ExcelImporter class and call the Import method. The following example illustrates how to do this:
C# Copy Code |
---|
var excelImporter = new ExcelImporter(); |
Visual Basic Copy Code |
---|
Dim excelImporter As New ExcelImporter() |