G
Guest
Hi,
I want to create a text file in the following format:
Name=yyy
Amount=zzz
and so on. The file is key-value pair and each pair appears on next line.
Now part of the data comes from the grid whereas rest I pick up from the
database. And I wrote the following code:
Dim strmExport As System.IO.StreamWriter
strmExport = New System.IO.StreamWriter &
_(objInterfaceINIData.strWorkingDirectory & mstrTempFileInput)
strmExport.AutoFlush = True
strLine = ""
strmExport.WriteLine(strLine)
strLine = "Name=" & """" & strName.Trim & """"
'Note Double quotes to take of any single quote in the name
strmExport.WriteLine(strLine)
strLine = "Amount=" & dblAmount
strmExport.WriteLine(strLine)
And so on.
Now the client says that my output file has tab chars (ascii 9). But in my
code, I am not using tab anywhere.
Now:
a. Does WriteLine add a tab char? But I cannot use Write method since I need
the key-value pair on separate lines. How do I remove tab keys?
b. I opened the file in notepad but did not see tab key. Also tried in Word.
Is there any other way to find if tab key exist in the output file?
Regards,
VJ
I want to create a text file in the following format:
Name=yyy
Amount=zzz
and so on. The file is key-value pair and each pair appears on next line.
Now part of the data comes from the grid whereas rest I pick up from the
database. And I wrote the following code:
Dim strmExport As System.IO.StreamWriter
strmExport = New System.IO.StreamWriter &
_(objInterfaceINIData.strWorkingDirectory & mstrTempFileInput)
strmExport.AutoFlush = True
strLine = ""
strmExport.WriteLine(strLine)
strLine = "Name=" & """" & strName.Trim & """"
'Note Double quotes to take of any single quote in the name
strmExport.WriteLine(strLine)
strLine = "Amount=" & dblAmount
strmExport.WriteLine(strLine)
And so on.
Now the client says that my output file has tab chars (ascii 9). But in my
code, I am not using tab anywhere.
Now:
a. Does WriteLine add a tab char? But I cannot use Write method since I need
the key-value pair on separate lines. How do I remove tab keys?
b. I opened the file in notepad but did not see tab key. Also tried in Word.
Is there any other way to find if tab key exist in the output file?
Regards,
VJ