The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:




Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Testing Tools >> IBM/Rational Robot

Pages: 1
dumr
Newbie


Reged: 12/19/11
Posts: 3
Need script for read xls data in sqa basic
      #693868 - 12/19/11 08:28 AM

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

Thanks
Dumr


Post Extras: Print Post   Remind Me!   Notify Moderator  
Ciege
Advanced Member


Reged: 02/27/02
Posts: 593
Loc: Scottsdale, AZ, USA
Re: Need script for read xls data in sqa basic [Re: dumr]
      #693899 - 12/19/11 01:44 PM

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...


Post Extras: Print Post   Remind Me!   Notify Moderator  
EmileZwiggelaar
Newbie


Reged: 12/15/11
Posts: 1
Re: Need script for read xls data in sqa basic [Re: Ciege]
      #694672 - 01/02/12 11:31 PM

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


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 5 anonymous users are browsing this forum.

Moderator:  AJ, RSBarber 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 2388

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5