SPONSORS:






User Tag List

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Junior Member
    Join Date
    Nov 2002
    Location
    Bangalore, Karnataka, India
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to read values from Excel file in Silk test

    Hi,

    How to read values present in Excel file in Silk test.

    Lokesh

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

  2. #2
    Super Member
    Join Date
    Jul 2001
    Location
    Earth
    Posts
    1,882
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to read values from Excel file in Silk test


  3. #3
    Junior Member
    Join Date
    Sep 2002
    Location
    rochester, ny, usa
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to read values from Excel file in Silk test

    I simply save the xls file as a csv file. Then i read a line, and parse it using GetField and a comma as a separator in the line.

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

  4. #4
    Senior Member
    Join Date
    Jul 2000
    Posts
    117
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to read values from Excel file in Silk test

    ... also search this forum for "excel" and "data driven".

    There are dozens of prior posts with loads of detailed information on the topic.

    Good Luck!

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

  5. #5
    Junior Member
    Join Date
    Nov 2002
    Location
    Bangalore, Karnataka, India
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to read values from Excel file in Silk test

    Hi,

    To Read values from Excel file i have created dsn for excel driver. While reading values it is throwing below error.
    I have One page "LoginInfo", if i give select statement to that page it is giving error. Please help me in this

    *** Error: (42S02) [Microsoft][ODBC Excel Driver] The Microsoft Jet database engine could not find the object 'LoginInfo'. Make sure the object exists and that you spell its name and the path name correctly.

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

  6. #6
    Senior Member
    Join Date
    Jul 2000
    Location
    Walsall, West Midlands, United Kingdom
    Posts
    259
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to read values from Excel file in Silk test

    You need to use named ranges and these named ranges are your tables rather than using worksheets.

    Therefore if all your info is in cells A4:B6 say, Name that range 'LoginInfo', then when you do select * from LoginInfo, it will return the contents.

    All this isn't Silk specific, it's all about setting up a DSN for an Excel spreadsheet. You will find heaps of info in newsgroups or http://groups.google.com



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

  7. #7
    Junior Member
    Join Date
    Nov 2002
    Location
    Bangalore, Karnataka, India
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to read values from Excel file in Silk test

    Hi,

    I have done that now i am able to read values from excel file.

    thanks a lot

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

  8. #8
    Member
    Join Date
    Jun 2002
    Location
    california
    Posts
    60
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to read values from Excel file in Silk test

    i have a problem reading data from a spreadsheet with 3 columns. I get the error [ ] *** Error: (07002) [Microsoft][ODBC Excel Driver] Too few parameters. Expected 1. If I have 2 columns, it works fine. Is there a limitation on this?


    What am I doing wrong here? Also, how do I retrieve 2 data values from a spreadsheet? Here's the thing..

    Index Object Status
    1 Object1 Running

    What I wanted to achieve is given the index, I want to return the appropriate object and status, how do I go about this?

    +] STRING GetObjectIconStatus (INTEGER iIcon)
    [ ]
    [ ] //SQL declares
    [ ] HANDLE hDB
    [ ] HANDLE hSQL
    [ ] //string sDescription
    [ ] string sObject
    [ ] //string sStatus
    [ ]
    [ ] //connect to the database
    [ ] hDB = DB_Connect ("DSN=Segue DDA Excel;DBQ=IconTest.xls;UID=;PWD=;")
    [ ]
    [ ] //execute a SQL statement
    [ ] hSQL = DB_ExecuteSQL (hDB, "SELECT Object from Icon where Index = {iIcon}")
    [ ]
    [ ] //while there are still rows to retrieve
    [-] while DB_FetchNext (hSQL, sObject)
    [ ] Print (sObject)
    [ ] //Print (sStatus)
    [ ]
    [ ] //clean up the query
    [ ] DB_FinishSql (hSQL)
    [ ]
    [ ] //disconnect from the database
    [ ] DB_Disconnect (hDB)
    [ ]
    [ ] return sObject

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

  9. #9
    Senior Member
    Join Date
    Jul 2000
    Location
    Walsall, West Midlands, United Kingdom
    Posts
    259
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to read values from Excel file in Silk test

    Works for me ok using the following code (note I'm using a different connection string, which may be the problem)...

    This function returns just the sObject string, but if you wanted to return both sObject and sStatus together, then instead of using STRING use a RECORD data type. Have a look in help at "RECORD data type" if you're unsure.

    Hope this helps.



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

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

    Re: How to read values from Excel file in Silk test

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Beeblemaster:
    Works for me ok using the following code (note I'm using a different connection string, which may be the problem)... [ ] //execute a SQL statement
    [ ] hSQL = DB_ExecuteSQL (hDB, "SELECT Object, Status from Icon where Index = {iIcon}")
    <HR></BLOCKQUOTE>
    Hi,
    How you give the tablename as Icon? Could you pls attach the Excel file..?
    I want to access the data from Excel sheet, without creating any DSNs. Is it possible?


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

 

 
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
  •  

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 02:06 PM.

Copyright BetaSoft Inc.