Hi,
probably you are not interested in, but I've just made this script to extract rows from csv files and write in dbf files:
Global $Dbf
Global $File_in = "C:\input.csv"
Global $File_out = "output"
Func OpenDBFConn($Path)
$Conn = ObjCreate("ADODB.Connection")
$Conn.Open ("Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & $Path & ";" & _
"Extended Properties=""DBASE IV;"";" )
Return $Conn
EndFunc
$Dbf = OpenDBFConn("c:\")
$Dbf.Execute ("Create Table " & $File_out & " (code char(4), codeclient char(10), Doc_number char(10), sender char(50), email char(50))")
$file = FileOpen($File_in, 0)
$lineCount = 0
If $file = -1 Then
MsgBox(0, "Error", "Unable to open file.")
Exit
EndIf
While 1
$lineCount += 1
$line = FileReadLine($file)
If @error = -1 Then ExitLoop
If $lineCount > 1 Then
$field = StringSplit($line, ";")
$Dbf.Execute ("Insert into " & $File_out & " Values('" & $field[1] & "','" & $field[2] & "','" & $field[3] & "','" & $field[4] & "','" & $field[5] & "')")
EndIf
Wend
FileClose($file)
Rosmild