Sub veri_Al_Duzenle()
Dim objStream, strData() As String
ReDim strData2(5000) As String
Set objStream = CreateObject("ADODB.Stream")
objStream.Charset = "utf-8"
objStream.Open
objStream.LoadFromFile (ThisWorkbook.Path & "\" & "Uyarı.txt")
strData = Split(objStream.ReadText, vbNewLine)
objStream.Close
Set objStream = Nothing
Dim i, a, b As Integer
b = 0
ReDim strData2(5000) As String
For i = 0 To UBound(strData)
If (Right(strData(i), 4)) = "süz)" Then
b = b
Else
If strData(i) = "-1" Then
b = b + 1
End If
b = b + 1
End If
Next
ReDim strData2(b)
b = 0
For i = 0 To UBound(strData)
If (Right(strData(i), 4)) = "süz)" Then
Else
If strData(i) = "-1" Then
b = b + 1
End If
strData2(b) = strData(i)
b = b + 1
End If
Next
Dim c, d
c = 1
d = 1
For i = 0 To UBound(strData2)
mdl = i Mod 29
If mdl = 0 Then
veri = strData2(i)
veri = Replace(veri, "Devamsızlık Mektubu (", "")
veri = Replace(veri, ")", "")
c = c + 1
Cells(c, 1) = veri
End If
If mdl = 7 Then
veri = strData2(i)
veri = Replace(veri, "Velisi olduğunuz okulumuzun ", "-")
veri = Replace(veri, "öğrencilerinden", "-")
veri = Replace(veri, "numaralı", "-")
veri = Replace(veri, "aşağıda", "-")
veri = Split(veri, "-")
Cells(c, 2) = veri(1)
Cells(c, 3) = veri(2)
Cells(c, 4) = veri(3)
End If
If mdl = 6 Then
veri = strData2(i)
veri = Replace(veri, "Sayın ", "")
Cells(c, 5) = veri
End If
If mdl = 18 Then
Cells(c, 6) = strData2(i)
End If
If mdl = 19 Then
Cells(c, 7) = strData2(i)
End If
Next
End Sub