ich kann mit dem nachfolgenden Code Daten aus einer Zelle in Excel in eine txt datei schreiben lassen.
Sub Upload()
Dim z As String
Dim z1 As String
Dim i As Integer
Dim j As Integer
Dim a As String
Dim b As String
Dim c As String
Dim Strurl As String
Dim F As Integer
Dim objFSO As Object
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFolder (ThisWorkbook.Path & "\" & "Upload"), True
Set objFSO = Nothing
z = Worksheets("Spielerschnittliste").Cells(Rows.Count, 1).End(xlUp).Row
z1 = Worksheets("Spielerschnittliste").Cells(5, Columns.Count).End(xlToLeft).Column
Dim Pfad As String
Pfad = ThisWorkbook.Path & "\"
Pfad = Pfad & "Upload"
MkDir (Pfad)
For j = 1 To z1 Step 1
For i = 5 To z Step 1
F = FreeFile
c = Worksheets("Spielerschnittliste").Cells(i, j)
'Strurl = Environ("USERPROFILE") & "\Documents\" & a & "_" & b & "_PB120" & ".txt"
Strurl = Pfad & "\" & i & j & ".txt"
Open Strurl For Output As #F
Print #F, c
Next i
Next j
Close #F
End Sub
Ich möchte nun, dass eine Datei (I.txt) erstellt wird in der die die Daten stehen.
# Answer all prompts negatively so the script
#does not stall on error
option batch on
# Disable overwrite confirmations
option confirm off
# Connect using a password
open ftp://w00b172b:Q2AnNa9uUKWWSA9R@skkwillmering.de
# Upload files
binary
put c
put c
exit
Sprich es werden die Dateinamen die in dem ersten Code gebildet werden, hier aufgelistet z.B. 31.txt
Hat hierzu wer eine Idee?