csvschema

Is there any specification for schema.ini files for CSV's


I am wanting to create a Schema.ini file to define a CSV file and cannot find a specification online after searching,

Does such a specification exist?

Thanks


Solution

  • Microsoft's MSDN has a good article on schema.ini: Schema.ini File (Text File Driver) (Archived here.)

    For a CSV file a bare-bones schema should look something like:

    [filename.csv]
    Format=CSVDelimited
    

    You can, of course, add extra options like column names and data types (see the above link for details).

    The schema.ini file needs to be in the SAME FOLDER as the file you want to read.