Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Uploading excel file through the script-error
#1
Not Solved
Hi All,

I am facing an issue while recording a script in QTP. My script is as follows:

Code:
'Browser(" ").Page(" ").Frame("ControlContainer").WebFile(" ").Set "D:\Book3.xls"

Browser( ). Page( ). Frame( ).WebButton( ). Click

So basically, u enter a value in the Webfile element and perform a click operation on the upload button to upload the excel file.

It works fine manually , but when I run this code the application throws an error saying

FILE FORMAT ERROR
Your File is not Valid Format


What could be wroung? SInce it is fine manually, it is something to do with the way QTP is handling this..Please let me know what you all think..


Thanks,
Lakshmi
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Excel and Driver Script shipu 1 3,862 02-27-2014, 09:09 AM
Last Post: supputuri
  how to find Excel file exist or not in vbscript code sree.85 3 11,331 08-22-2013, 11:42 AM
Last Post: akhandesh
  .vbs script error when trying to insert a value in a sapguitable frebuffi 5 6,928 07-18-2013, 03:04 PM
Last Post: Staff
  Error while opening text file through QTP SarodeGirish 5 4,653 06-25-2012, 01:03 PM
Last Post: sandya
  Error while creating object using description.create object in VB script SarodeGirish 5 6,318 06-19-2012, 05:30 PM
Last Post: ssvali

Forum Jump:


Users browsing this thread: 1 Guest(s)