SPONSORS:






User Tag List

Results 1 to 5 of 5
  1. #1
    SQA Knight
    Join Date
    Sep 2001
    Location
    Bangalore,India
    Posts
    2,549
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Excel Sheet as data file

    Hi Group,
    I want to use excel sheet for both input and output of the testcase.
    Excel sheet should contain all the data for the testcase and test result should be written in the same excel sheet.

    I'm looking for the code snippet. If anyone has done code to use excel sheet, please send me the code snippet...

    ------------------
    Thanks & Regards,
    Palani.
    Thanks & Regards,
    Palani.
    http://tips-testing.blogspot.com/index.html
    Quote: Donít hesitate to initiate!

  2. #2
    Senior Member
    Join Date
    Nov 2001
    Posts
    375
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Excel Sheet as data file

    Well theres a real cool way of doing it...

    u can treat the Excel file as a database and query it!

    Heres how:
    http://ameliortech.com/stuff/toolkit...Test_Excel.zip

    Cheers!
    Aatish

    ------------------

  3. #3
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Excel Sheet as data file

    You need to treat your Excel spreadsheet like any other database and use the DB_<name> calls in 4Test to manipulate your data.

    The trick is to create "tables" in the spreadsheet. Use the ODBC mgr in Winders to set up the ODBC connection and use the built in Excel driver to connect with the DSN you want to use. Then in Excel, highlight the cells you want to use to represent your table. You need to create a "named range" in the spreadsheet. (From memory here) I believe it is under the Insert menu, pick Display... and choose Name. I believe a dialog will pop up and allow you to name those highlighted cells. This will be the "table" name you will reference in your SQL call.

    That's sketchy on the details, but the pertinent steps are there. Does it make sense?

    ------------------

  4. #4
    SQA Knight
    Join Date
    Sep 2001
    Location
    Bangalore,India
    Posts
    2,549
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Excel Sheet as data file

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by DJGray:
    The trick is to create "tables" in the spreadsheet. Use the ODBC mgr in Winders to set up the ODBC connection and use the built in Excel driver to connect with the DSN you want to use. Then in Excel, highlight the cells you want to use to represent your table. You need to create a "named range" in the spreadsheet. (From memory here) I believe it is under the Insert menu, pick Display... and choose Name. I believe a dialog will pop up and allow you to name those highlighted cells. This will be the "table" name you will reference in your SQL call.<HR></BLOCKQUOTE>
    Hi all,
    Thanks for your inputs. Yesterday I searched the net for sample scripts. I took some scripts from qadownloads, addendum, ameliortech and this froum. Amelortech document gives how to use silk to access the Excel by samples.
    Also I searched some URLs to get the knowledge in MS Excel driver. I can use Excel sheet without creating any DSN. For the table, give your worksheet name not filename. I used query like below.
    "SELECT * from [Sheet1$]"



    ------------------
    Thanks & Regards,
    Palani.
    Thanks & Regards,
    Palani.
    http://tips-testing.blogspot.com/index.html
    Quote: Donít hesitate to initiate!

  5. #5
    SQA Knight
    Join Date
    Sep 2001
    Location
    Bangalore,India
    Posts
    2,549
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Excel Sheet as data file

    Hi,
    I have given the code snippet. You have to give the Excel sheet with full path. By using this method, you can get data from Excel sheet, without giving DSN.

    Where [Sheet1$] - Worksheet name is Sheet1


    ------------------
    Thanks & Regards,
    Palani.
    Thanks & Regards,
    Palani.
    http://tips-testing.blogspot.com/index.html
    Quote: Donít hesitate to initiate!

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin 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:13 AM.

Copyright BetaSoft Inc.