| || |
How to open the existing excel sheet in TP
Need to open existing excel sheet and updating it,but some error is occuring.
Dim filename As String
Dim filepath As String
Dim fp, FILE As Object
Dim ExcelSheet As Object
Set ExcelSheet = CreateObject("Excel.Sheet")
filepath = "E:\Tpscripts\TestData\CCY_TestData\"
filename = "CCY_TestResults.xls"
Set FILE = ExcelSheet.Workbooks.Open(strFilePath & strFileName)
FILE.Application.Visible = True
For i = 2 To 100
If FILE.Application.Cells(i, 3).Value = "Y" Then
FILE.Application.Cells(i, 4).Value = "PASS"
' Release the object variable.
Set FILE = Nothin
The Error is:
Run Time Error 438:
The object does not support Property or Method.
Please help me
Re: How to open the existing excel sheet in TP
First, can you indicate which line of your script is causing the error.
Secondly, you could achieve the same thing using the ActiveData functionality that allows you to read and write Excel, CSV and TXT files.