-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathABAP2XLSX.LongestLine.vbs
More file actions
32 lines (26 loc) · 1.09 KB
/
ABAP2XLSX.LongestLine.vbs
File metadata and controls
32 lines (26 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
'-Begin-----------------------------------------------------------------
'-Directives----------------------------------------------------------
Option Explicit
'-Constants-----------------------------------------------------------
Const ForReading = 1
'-Variables-----------------------------------------------------------
Dim FileName, FSO, File, i, LenLine, OldLenLine, Zeile
'-Main----------------------------------------------------------------
FileName = "ABAP2XLSX_V_7_0_5.nugg"
Set FSO = CreateObject("Scripting.FileSystemObject")
If IsObject(FSO) Then
Set File = FSO.OpenTextFile(FileName, ForReading)
Do Until File.AtEndOfStream
i = i + 1
LenLine = Len(File.ReadLine)
If LenLine > OldLenLine Then
OldLenLine = LenLine
Zeile = i
End If
Loop
File.Close
Set FSO = Nothing
MsgBox FileName & vbCrLf & vbCrLf & "Longest line is " & _
CStr(Zeile) & " with " & OldLenLine & " characters", vbOkOnly
End If
'-End-------------------------------------------------------------------