kdjonesmtb2
Technical User
Hello,
I am able to add a single line to a Text file using a DataTable. I would like to be able to add multiple lines into the Text file using the Datatable
How can I add the 2nd, 3rd more lines?
Dim S1' Variable for custom spacing 1
s1=Space((DataTable.Value("Custom_spacing1",dtLocalSheet))) ' variabke that insert spacing on loop
Set fso=createobject("Scripting.FileSystemObject")
'Create a non existing file "qtptest.txt " with overwrite option as True
Set qfile1=fso.CreateTextFile("\\ikanas267\Documents\kgittensjones\My Documents\QTP Test 834\Text files\qtptest1.txt",true,False)
qfile1.Write((DataTable.Value("ISA_I01_Author_Info_Qualifier",dtGlobalSheet)))
qfile1.Write("*")
qfile1.Write(s1)
qfile.Write((DataTable.Value("Test2",dtGlobalSheet))) ' How do I create a new line for this in the txt file qtptest1.txt?
I am able to add a single line to a Text file using a DataTable. I would like to be able to add multiple lines into the Text file using the Datatable
How can I add the 2nd, 3rd more lines?
Dim S1' Variable for custom spacing 1
s1=Space((DataTable.Value("Custom_spacing1",dtLocalSheet))) ' variabke that insert spacing on loop
Set fso=createobject("Scripting.FileSystemObject")
'Create a non existing file "qtptest.txt " with overwrite option as True
Set qfile1=fso.CreateTextFile("\\ikanas267\Documents\kgittensjones\My Documents\QTP Test 834\Text files\qtptest1.txt",true,False)
qfile1.Write((DataTable.Value("ISA_I01_Author_Info_Qualifier",dtGlobalSheet)))
qfile1.Write("*")
qfile1.Write(s1)
qfile.Write((DataTable.Value("Test2",dtGlobalSheet))) ' How do I create a new line for this in the txt file qtptest1.txt?