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
    Dec 2011
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Need script for read xls data in sqa basic

    Hi,
    Any body please provide the script for read excel data coulmn wise

    Thanks
    Dumr

  2. #2
    Advanced Member Ciege's Avatar
    Join Date
    Feb 2002
    Location
    Scottsdale, AZ, USA
    Posts
    594
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Need script for read xls data in sqa basic

    Out of curiosity, what have you done to help yourself other than asking others to do your job for you?
    If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

    Ciege...

  3. #3
    Junior Member
    Join Date
    Dec 2011
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Need script for read xls data in sqa basic

    A few hints on how to start:

    Dim sDirectory As String, sFilename As String
    Dim iLastrow As Integer
    Dim objExcel As Object, objTabel As Object
    Dim xlCellTypeLastCell

    xlCellTypeLastCell = 11 'Last filled cell in a sheet

    Set objExcel = CreateObject("Excel.Application") 'make Excel known to Rational

    objExcel.Workbooks.Open(FileName:= sDirectory & sFilename) 'open excelfile / table using variables for location and name

    Set objTabel = objExcel.Workbooks(1).Worksheets(1).Cells()

    ' Define last row
    iLastColum = objTabel.SpecialCells(xlCellTypeLastCell).Column

    From there on you can 'easily' read the data using objTabel(ROW, COLUMN).Text

  4. #4
    New Member
    Join Date
    May 2015
    Location
    Mont-Saint-Hilaire, QC
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0
    This is great thanks.. I need this too

  5. #5
    SQA Knight
    Join Date
    May 2006
    Location
    Playa Del Rey, California, United States
    Posts
    2,647
    Post Thanks / Like
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0
    An alternate way I think is easier to do is to use ODBC drivers.

    windows - Using Excel as an ODBC database - Stack Overflow

    It allows you to quickly query the spreadsheet as if it were a database.

    Works very well when the data is in a uniform column/row format.
    David Lai
    SDET / Consultant
    LinkedIn profile

 

 

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 © 2017 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 9.38%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 11:29 PM.

Copyright BetaSoft Inc.