Dim a
a=Asc("A")
msgbox a
Output-65
Dim a
a=Asc("a")
msgbox a
Output-97
QTP Script to return ASCII value of a given character-script in qtp to return the ANSI character code corresponding to given character-Asc function
QTP Script to get Excelsheet Rowcount and Columncount
QTP Script To retrieve no.of columns and no.of rows in an excelsheet.
In excelsheet we have values as shown below
A B C
1 aa ll
2 bb aa
3 cc xx
4 dd mm
5 ee ii
Check This Post for Reading Specific cell value from excel sheet using VBScript in QTP
VBScript to get rowcount and columncount.
Set a= CreateObject("Excel.Application")
Set b=a.workbooks.open("d:\es.xls")
Set c=b.worksheets("Sheet1")
column_count= c.usedrange.columns.count
row_count= c.usedrange.rows.count
Msgbox "No.of Columns="&column_count
Msgbox "No.of Rows="&row_count
b.close
Result:
No.of Columns=3
No.of Rows=5
SQL Queries Collection
Movie Songs Lyrics
QTP Script to export database data to excel sheet
VBScript to Check Whether Particular File Exists or Not.
Check this Post for Datatable Methods.
Excel Sheet Creation and Writing Data Into It
Data Driven Using Excel Sheet
Data Driven Using Notepad
QTP Script To Delete File From Particular Location
QTP Script to delete particular file from particular location.
Set f = CreateObject("Scripting.FileSystemObject")
f.DeleteFile("D:\file1.txt")
The Above Script will remove(delete)notepad naming file1(text file)from D drive.
QTP Script To Create File
Data Driven Testing Using Notepad