kdjonesmtb2
Technical User
Hello,
I am receiving a syntax error in the following vbscript
The test run cannot continue due to a syntax error.
Invalid character
Line (1): "set objexcel = Createobject(“Excel.Application”)"
I would also like to use the fieldvalue variable to populate a text file rather than the DataTable references listed below
As I reached a Datable row limitation in Quick Test Professional
' qfile1.Write((DataTable.Value("File_Header_REF7",dtGlobalSheet)))
'
' qfile1.Write((DataTable.Value("Common_Delimiter",dtLocalSheet)))
'
' qfile1.Write((DataTable.Value("REF01_Reference_Identification_Qualifier4",dtGlobalSheet)))
'
' qfile1.Write((DataTable.Value("Common_Delimiter",dtLocalSheet)))
'
' qfile1.Write((DataTable.Value("REF02_Reference_Identification5",dtGlobalSheet)))
'
' qfile1.Write((DataTable.Value("Tilde",dtLocalSheet))) & vbcrlf
Dim objexcel, objWorkbook, objDriverSheet, columncount, rowcount
set objexcel = Createobject(“Excel.Application”)
Set objWorkbook = objExcel.WorkBooks.Open(“\\ikanas267\Documents\kgittensjones\My Documents\QTP Test 834\DataTable_Spillover.xls”)
Set objDriverSheet = objWorkbook.Worksheets(“Sheet1”)
columncount = objDriverSheet.usedrange.columns.count
rowcount = objDriverSheet.usedrange.rows.count
for i = 1 to columncount
columnname = objDriversheet.cells(i,1)
if columnname = knowncolumnname then
for j = 1 to rowcount
fieldvalue = objdriversheet.cells(j,i)
next
end if
next
I am receiving a syntax error in the following vbscript
The test run cannot continue due to a syntax error.
Invalid character
Line (1): "set objexcel = Createobject(“Excel.Application”)"
I would also like to use the fieldvalue variable to populate a text file rather than the DataTable references listed below
As I reached a Datable row limitation in Quick Test Professional
' qfile1.Write((DataTable.Value("File_Header_REF7",dtGlobalSheet)))
'
' qfile1.Write((DataTable.Value("Common_Delimiter",dtLocalSheet)))
'
' qfile1.Write((DataTable.Value("REF01_Reference_Identification_Qualifier4",dtGlobalSheet)))
'
' qfile1.Write((DataTable.Value("Common_Delimiter",dtLocalSheet)))
'
' qfile1.Write((DataTable.Value("REF02_Reference_Identification5",dtGlobalSheet)))
'
' qfile1.Write((DataTable.Value("Tilde",dtLocalSheet))) & vbcrlf
Dim objexcel, objWorkbook, objDriverSheet, columncount, rowcount
set objexcel = Createobject(“Excel.Application”)
Set objWorkbook = objExcel.WorkBooks.Open(“\\ikanas267\Documents\kgittensjones\My Documents\QTP Test 834\DataTable_Spillover.xls”)
Set objDriverSheet = objWorkbook.Worksheets(“Sheet1”)
columncount = objDriverSheet.usedrange.columns.count
rowcount = objDriverSheet.usedrange.rows.count
for i = 1 to columncount
columnname = objDriversheet.cells(i,1)
if columnname = knowncolumnname then
for j = 1 to rowcount
fieldvalue = objdriversheet.cells(j,i)
next
end if
next