Xceed Workbooks for .NET v3.0 Documentation
Xceed.Workbooks.NET Assembly / Xceed.Workbooks.NET Namespace / CSVImportOptions Class
Members Example


In This Topic
    CSVImportOptions Class
    In This Topic
    Specifies the import options' properties for a CSV document or CSV stream when importing data in a Worksheet through the Worksheet.ImportData method.
    Syntax
    'Declaration
     
    
    Public Class CSVImportOptions 
       Inherits ImportOptions
    'Usage
     
    
    Dim instance As CSVImportOptions
    public class CSVImportOptions : ImportOptions 
    Remarks
    This class derives from ImportOptions.
    Example
    var workbook = Workbook.Create( "test.xlsx" );
    
    var worksheet = workbook.Worksheets[ 0 ];
    
    // Define a path to a csv document, the import options(which separator to use) and call the ImportData function.
    
      var stringSCVData = "Book1.csv";
      var stringCSVImportOptions = new CSVImportOptions() { DestinationTopLeftAddress = "C5", Separator = "," };
      worksheet.ImportData( stringSCVData, stringCSVImportOptions );
    
    workbook.Save();
    Inheritance Hierarchy

    System.Object
       Xceed.Workbooks.NET.ImportOptions
          Xceed.Workbooks.NET.CSVImportOptions

    Public Constructors
     NameDescription
    Public Constructor  
    Top
    Public Properties
     NameDescription
    Public PropertyGets or sets the Id of the Column in which the first data item will be imported. (Inherited from Xceed.Workbooks.NET.ImportOptions)
    Public PropertyGets or sets the Id of the Row in which the first data item will be imported.   (Inherited from Xceed.Workbooks.NET.ImportOptions)
    Public PropertyGets or sets the address of the Cell in which the first data item will be imported. (Inherited from Xceed.Workbooks.NET.ImportOptions)
    Public PropertyGets or sets if the imported linear data (like a List<string>, Array<int>, MyProduct[], ...) will be displayed vertically in the Worksheet. (Inherited from Xceed.Workbooks.NET.ImportOptions)
    Public PropertyGets or sets the separator used to split the CSV data. The default value is ",".  
    Top
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also