SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Jan 2011
    Posts
    28
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Using DDT.ExcelDriver with C#

    Hi, I would like to know how can I read a Excel file?

    I didn't find some routines in the AutomatedQA site:

    - How to count the rows in the Excel spreadsheet;

    I tried to use while (!Driver["EOF"]) but not works, says that this Object (which is inicialized like Excel = DDT["ExcelDriver"]("c:\\Usuario.xls", Usuario) does not support this operation

    - How to get data from a cell;

    - How to get data from a cell in a specific column;

    I tried the following operations:

    var cmat, matricula;
    cmat = Excel["ColumnName"](0);
    matricula = VarToStr(Excel["CColumnName"](cmat)["Value"](i));
    textbox = table3["Cell"](0, 0)["Textbox"]("txtCode");
    textbox["SetText"]("matricula");

    and didn't work.


    I am completely lost, can anybody helps me?

    thanks.

  2. #2
    Senior Member
    Join Date
    Nov 2009
    Posts
    124
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Using DDT.ExcelDriver with C#

    Hi,

    In the sample TestComplete, you have a folder that name is 'DDT'. It contain a examples for using the DDT Driver.

    The folder is 'TestComplete 7 Samples\Scripts\DDT'.

  3. #3
    Senior Member
    Join Date
    Jul 2008
    Posts
    1,049
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Using DDT.ExcelDriver with C#

    Hi Lugati,

    [ QUOTE ]
    How to count the rows in the Excel spreadsheet

    [/ QUOTE ]
    See the examples in the Using DDT Drivers help topic: the RecNo variable counts the number of rows.

    [ QUOTE ]
    Excel = DDT["ExcelDriver"]("c:\\Usuario.xls", Usuario);

    [/ QUOTE ]
    The second parameter of the ExcelDriver method must be a string:

    <font class="small">Code:</font><hr /><pre>
    Excel = DDT["ExcelDriver"]("c:\\Usuario.xls", "Usuario");
    </pre><hr />

    [ QUOTE ]
    How to get data from a cell

    [/ QUOTE ]
    [ QUOTE ]
    How to get data from a cell in a specific column

    [/ QUOTE ]
    Refer to the help topic above.
    Regards,
    Allen - SmartBear Support

  4. #4
    Junior Member
    Join Date
    Jan 2011
    Posts
    28
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Using DDT.ExcelDriver with C#

    Already tried this article, not working.

  5. #5
    Senior Member
    Join Date
    May 2004
    Posts
    1,196
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Using DDT.ExcelDriver with C#

    Hi Lugati,

    Please post full script you are using. Also, clarify what errors you have and what lines they occur in.
    Best regards,
    David - SmartBear Support

 

 

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 04:27 AM.

Copyright BetaSoft Inc.