Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Imports System.IO
Dim strworkin As String
Dim strworkout As String
Dim arrwork() As String
Dim sr As New StreamReader("C:\test.bat")
Dim sw As New StreamWriter("C:\testout.txt", FileMode.Create)
Do Until sr.EndOfStream
strworkin = sr.ReadLine()
arrwork = strworkin.Split(" ")
strworkout = ""
For intkount = 0 To UBound(arrwork)
' do your reformatting in here - in this case just put in commas between the fields
strworkout += arrwork(intkount) + ","
Next
sw.WriteLine(strworkout)
Loop
sr.Close()
sw.Close()
Imports System.IO
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim strworkin As String
Dim strworkout As String
Dim arrwork() As String
Dim sr As New StreamReader("C:\test.bat")
Dim sw As New StreamWriter("C:\testout.txt", FileMode.Create)
Do Until sr.EndOfStream
strworkin = sr.ReadLine()
arrwork = strworkin.Split(" ")
strworkout = ""
For intkount = 0 To UBound(arrwork)
' do your reformatting in here - in this case just put in commas between the fields
strworkout += arrwork(intkount) + ","
Next
sw.WriteLine(strworkout)
Loop
sr.Close()
sw.Close()
End Sub
End Class
[green]'let's solve NumHours[/green]
Select Case strworkin.Substring(45, 2)
Case "00"
NumHours = "00000" + strworkin.Substring(42, 3)
Case "25"
NumHours = "00" + strworkin.Substring(42, 3) + ".25"
Case "50"
NumHours = "000" + strworkin.Substring(42, 3) + ".5"
Case "75"
NumHours = "00" + strworkin.Substring(42, 3) + ".75"
Case Else
MessageBox.Show "Error."
End Select
[green]'let's solve NumHours[/green]
[blue]Dim strMystr As String = strworkin.Substring(42, 3)[/blue]
Select Case strworkin.Substring(45, 2)
Case "00"
NumHours = "00000" + [blue]strMystr[/blue]
Case "25"
NumHours = "00" + [blue]strMystr[/blue] + ".25"
Case "50"
NumHours = "000" + [blue]strMystr[/blue] + ".5"
Case "75"
NumHours = "00" + [blue]strMystr[/blue] + ".75"
Case Else
MessageBox.Show "Error."
End Select