SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Junior Member
    Join Date
    May 2008
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    QTP - Error while uploading excel file

    Hi All,

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

    '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

  2. #2
    Senior Member
    Join Date
    Jun 2007
    Posts
    132
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: QTP - Error while uploading excel file

    1. Try a="D:\Book3.xls"

    2. Try recording the Webfile action

  3. #3
    Advanced Member
    Join Date
    Aug 2007
    Location
    Six Feet Under
    Posts
    717
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: QTP - Error while uploading excel file

    Well I don’t think QTP should consider “\” as escape character when used as a string
    So regEx is not required but try once it may help.
    But as per your post

    FILE FORMAT ERROR
    Your File is not Valid Format

    This is not at all QTP Related issue Please, and it what your application is saying.
    check both time you are using the same file only

    Regards,
    Manish Bansal
    Thanks,
    Manish Bansal

    Checkout Blog Page At
    http://www.softtechlabs.com

  4. #4
    Member
    Join Date
    Nov 2007
    Location
    Bangalore, Karnataka
    Posts
    245
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: QTP - Error while uploading excel file

    hi i tried this:
    Browser("a").Page("b").Frame("c").WebFile("d").Set "D:\Book3.xls" and it worked nice for me. well i think its problem with your excel file format, or excel version you are using, make sure they are compitable.
    Because once in vb i faced this same problem when i was trying to connect vb6 to excel file(virsion 2007).





    Regards.
    Cheerrss

  5. #5
    Advanced Member
    Join Date
    Aug 2007
    Location
    Six Feet Under
    Posts
    717
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: QTP - Error while uploading excel file

    [ QUOTE ]
    excel version you are using, make sure they are compitable.
    Because once in vb i faced this same problem when i was trying to connect vb6 to excel file(virsion 2007).


    [/ QUOTE ]
    Quite possible, but this guy is saying running fine manually, Weird !

    Regards,
    Manish Bansal
    Thanks,
    Manish Bansal

    Checkout Blog Page At
    http://www.softtechlabs.com

  6. #6
    Member
    Join Date
    Nov 2007
    Location
    Bangalore, Karnataka
    Posts
    245
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: QTP - Error while uploading excel file

    yeah realy am too confused about it. hey lakshmiQTP why dont you send more of your code to this post, so can check it clearly by running your same code.

    Another thing i noticed in the code you posted above is

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

    WebFile(" "), is empty, there should be a logicalname/name of the element WebFile.

    Regards.
    Cheerrss

  7. #7
    Advanced Member
    Join Date
    Aug 2007
    Location
    Six Feet Under
    Posts
    717
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: QTP - Error while uploading excel file

    [ QUOTE ]
    WebFile(" "), is empty, there should be a logicalname/name of the element WebFile.

    [/ QUOTE ]

    Hey ShowMaker ... [img]/images/graemlins/wink.gif[/img] !!!
    Thanks,
    Manish Bansal

    Checkout Blog Page At
    http://www.softtechlabs.com

  8. #8
    Junior Member
    Join Date
    May 2008
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: QTP - Error while uploading excel file *DELETED*

    Post deleted by Tarun Lalwani

  9. #9
    Junior Member
    Join Date
    May 2008
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: QTP - Error while uploading excel file *DELETED*

    Post deleted by Tarun Lalwani

  10. #10
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: QTP - Error while uploading excel file

    Try this

    Browser(" ").Page(" ").Frame("ControlContainer").WebFile(" ").Highlight
    Browser(" ").Page(" ").Frame("ControlContainer").WebFile(" ").Set "D:\Book3.xls"
    Browser(). Page(). Frame().WebButton().Click

 

 
Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.00%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 12:03 PM.

Copyright BetaSoft Inc.