Monday

QTP - .xlsx gives invalid file erroe while import

.xlsx was failing ...

SystemUtil.Run "C:\Program Files\Internet Explorer\iexplore.exe","","C:\Documents and Settings\shukr02","open"


searchString=Datatable.Value("col1",dtGlobalsheet)
datatable.ImportSheet "C:\Learning\lrn\ExternalSheet.xls","Sheet1","Action1"

Browser("Google").Page("Google").WebEdit("q").Set searchString
Browser("Google").Page("Google").WebButton("Google Search").Click
Browser("Google").Page("hello - Google Search").Sync
wait 2
Browser("Google").CloseAllTabs

****************to over come
an Excel workbook, by typing, "excel" in "Windows-Run" and save it as "Excel 97-2003 Workbook(*.xls), I am able to import the data Successfully.

then the code will work fine ...just rename file name

No comments:

Post a Comment