Sub xls2csv()
vevo = Worksheets("ini").Range("A2") & ".txt"
Sheets("db").Select
Const DELIMITER As String = "|"
Dim myRecord As Range
kjfile = "Z:\konyvtar\" & kjev & "\txt\" & vevo
Dim myField As Range
Dim nFileNum As Long
Dim sOut As String
nFileNum = FreeFile
' Open "Test.txt" For Output As #nFileNum
Open kjfile For Output As #nFileNum
For Each myRecord In Range("A1:a" & _
Range("a" & Rows.Count).End(xlUp).Row)
With myRecord
For Each myField In Range(.Cells, _
Cells(.Row, Columns.Count).End(xlToLeft))
sOut = sOut & DELIMITER & myField.Text
Next myField
Print #nFileNum, Mid(sOut, 2)
sOut = Empty
End With
Next myRecord
Close #nFileNum
End Sub
Nincsenek megjegyzések:
Megjegyzés küldése