Hello,
I tried this code to replace a tab delimited file to a comma delimited file with notepad files. What I did was replace tabs with commas. This worked fine until I used the notepad files from the spooler and it will not do anything. I think the issue here is that the notepad files from the spooler are not tab delimited, but rather just whitespaces. Any suggestions?? Any help and feedback would be appreciated!
Here is the code I used:
net1720
I tried this code to replace a tab delimited file to a comma delimited file with notepad files. What I did was replace tabs with commas. This worked fine until I used the notepad files from the spooler and it will not do anything. I think the issue here is that the notepad files from the spooler are not tab delimited, but rather just whitespaces. Any suggestions?? Any help and feedback would be appreciated!
Here is the code I used:
VB.NET:
Dim MyReader As New Microsoft.VisualBasic.FileIO.TextFieldParser("C:\test.txt")
MyReader.TextFieldType = FileIO.FieldType.Delimited
MyReader.SetDelimiters(",")
Dim sContents As String = IO.File.ReadAllText("C:\test.txt")
sContents = sContents.Replace(ControlChars.Tab, ","c)
net1720
Last edited by a moderator: