kdjonesmtb2
Technical User
How do I add code to append the following text file from the last populated row?
Set qfile1=fso.CreateTextFile("\\ikanas267\Documents\kgittensjones\My Documents\QTP 834\Text files\" & TextFileName,true,False) 'TextFileName used as a variable so that multiple 834 files can be generated from DataTable
qfile1.Write((DataTable.Value("Interchange_Control_Header",dtGlobalSheet)))
qfile1.Write((DataTable.Value("Common_Delimiter",dtLocalSheet)))
I want to populate with the following values pulled from an excel file and loaded to the vbscribt variables below
File_Header_REF7 = Trim(objDriverSheet.Range("A"& intRow ))
REF01_Reference_Identification_Qualifier4 = Trim(objDriverSheet.Range("B"& intRow))
REF02_Reference_Identification5 =Trim(objDriverSheet.Range("C" & intRow))
Dim rowcount
Dim objexcel
Dim objWorkbook
Dim objDriverSheet
Dim intRow
Dim File_Header_REF7
Dim REF01_Reference_Identification_Qualifier4
Dim REF02_Reference_Identification5
set objexcel = Createobject("Excel.Application")
'xlApp.visible = true
Set objWorkbook = objexcel.WorkBooks.Open("M:\QTP 834\DataTable_Spillover.xls")
Set objDriverSheet = objWorkbook.Worksheets("Sheet1")
intRow = 2
For inttRow = 2 to objDriverSheet.UsedRange.Rows.Count
File_Header_REF7 = Trim(objDriverSheet.Range("A"& intRow ))
REF01_Reference_Identification_Qualifier4 = Trim(objDriverSheet.Range("B"& intRow))
REF02_Reference_Identification5 =Trim(objDriverSheet.Range("C" & intRow))
print "File_Header_REF7"
Print File_Header_REF7
Print "REF01_Reference_Identification_Qualifier4 "
Print REF01_Reference_Identification_Qualifier4
print "REF02_Reference_Identification5"
print REF02_Reference_Identification5
Next
Set qfile1=fso.CreateTextFile("\\ikanas267\Documents\kgittensjones\My Documents\QTP 834\Text files\" & TextFileName,true,False) 'TextFileName used as a variable so that multiple 834 files can be generated from DataTable
qfile1.Write((DataTable.Value("Interchange_Control_Header",dtGlobalSheet)))
qfile1.Write((DataTable.Value("Common_Delimiter",dtLocalSheet)))
I want to populate with the following values pulled from an excel file and loaded to the vbscribt variables below
File_Header_REF7 = Trim(objDriverSheet.Range("A"& intRow ))
REF01_Reference_Identification_Qualifier4 = Trim(objDriverSheet.Range("B"& intRow))
REF02_Reference_Identification5 =Trim(objDriverSheet.Range("C" & intRow))
Dim rowcount
Dim objexcel
Dim objWorkbook
Dim objDriverSheet
Dim intRow
Dim File_Header_REF7
Dim REF01_Reference_Identification_Qualifier4
Dim REF02_Reference_Identification5
set objexcel = Createobject("Excel.Application")
'xlApp.visible = true
Set objWorkbook = objexcel.WorkBooks.Open("M:\QTP 834\DataTable_Spillover.xls")
Set objDriverSheet = objWorkbook.Worksheets("Sheet1")
intRow = 2
For inttRow = 2 to objDriverSheet.UsedRange.Rows.Count
File_Header_REF7 = Trim(objDriverSheet.Range("A"& intRow ))
REF01_Reference_Identification_Qualifier4 = Trim(objDriverSheet.Range("B"& intRow))
REF02_Reference_Identification5 =Trim(objDriverSheet.Range("C" & intRow))
print "File_Header_REF7"
Print File_Header_REF7
Print "REF01_Reference_Identification_Qualifier4 "
Print REF01_Reference_Identification_Qualifier4
print "REF02_Reference_Identification5"
print REF02_Reference_Identification5
Next