Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can a single schema.ini definition cover multiple files

Tags:

c#

csv

schema

I have defined a schema.ini file for a CSV file, but I have multiple CSVs which I would like to use the same definition for as they are a sequence.

I.e

File0.csv
File1.csv
File2.csv
File.etc.csv

My schema would be something like:

[File*.csv]
Format=Delimited(,)
ColNameHeader=True
col1="Brand Code" Text
col2=Description Text
col3="Display Sequence" Text
like image 655
Anthony Main Avatar asked Apr 04 '12 15:04

Anthony Main


1 Answers

As far as I can tell this isn't possible

-******** In fact it's posible, you can do it in this way.

[file1.csv]
FORMAT = Delimited(#)
ColNameHeader = True
MaxScanRows=10
Col1=...
Col2=...
ColN=...

[File2.csv]
FORMAT = Delimited(#)
ColNameHeader = True
MaxScanRows=10
Col1=...
Col2=...
ColN=...

Regards!

like image 60
Anthony Main Avatar answered Oct 23 '22 05:10

Anthony Main