How can I create schema.ini file? I need to export my .csv file to datagridview

前端 未结 2 1182
夕颜
夕颜 2020-12-19 17:21

I want to export a CSV file to a datagridview. I need to create the file schema.ini. But I don\'t know, how can I create it?

There is my code:



        
2条回答
  •  忘掉有多难
    2020-12-19 18:01

    Open up notepad and create a file similar to this:

    [YourCSVFileName.csv]
    ColNameHeader=True
    Format=CSVDelimited
    DateTimeFormat=dd-MMM-yyyy
    Col1=A DateTime
    Col2=B Text Width 100
    Col3=C Text Width 100
    Col4=D Long
    Col5=E Double
    

    Modify the above file to fit your specific data schema. Save it as SCHEMA.ini in the same directory where your *.CSV file is located.

    Read this link (Importing CSV File Into Database), it is a good example to get you up and understanding how the Schema.ini works

提交回复
热议问题