Can a single schema.ini definition span multiple files

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

i.e

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

My diagram will look something like this:

[File*.csv]
Format=Delimited(,)
ColNameHeader=True
col1="Brand Code" Text
col2=Description Text
col3="Display Sequence" Text
+5
source share
2 answers

As far as I can tell, this is impossible

- ******** It’s actually possible, you can do it this way.

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

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

Hello!

+5
source

You can define and write the circuit in your module / routine according to the file format you want to load. This module / subroutine must be started / called to create a circuit before starting the download. (my sample uses VB6)

: - Filenametxt - ,

IntFileHandleLog = FreeFile
Open App.Path & "schema.ini" For Output As #IntFileHandleLog
Print #IntFileHandleLog, "[" & FileNameTxt & "]"
Print #IntFileHandleLog, "Format=FixedLength"
Print #IntFileHandleLog, "MaxScanRows = 0"
Print #IntFileHandleLog, "CharacterSet = OEM"
Print #IntFileHandleLog, "Col1=" & """" & "Name" & """" & "Text Width 20"
Print #IntFileHandleLog, "Col2=" & """" & "PHONE_NUM" & """" & " Text Width 30"
Print #IntFileHandleLog, "Col3=" & """" & "PHONE_TYPE" & """" & " Text Width 20"
Print #IntFileHandleLog, "col4=" & """" & "UserName" & """" & " Text Width 20"
Print #IntFileHandleLog, "col5=" & """" & "A_STAT" & """" & " Text Width 10"
Print #IntFileHandleLog, "col6=" & """" & "B_STAT" & """" & " Text Width 10"
Print #IntFileHandleLog, "col7=" & """" & "RETRY" & """" & "integer width 2"
Print #IntFileHandleLog, "col8=" & """" & "Birth_Date" & """" & " double width 14"
Print #IntFileHandleLog, "Col9=" & """" & "Joint_Date" & """" & " double width 14"
Close #IntFileHandleLog
0

All Articles