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

    Cannot read text from cell in JavaTable

    Hello guys and girls! I'm new to this forum and to TP and VBA.

    I'm using TP 6.3.0 Build 153 and am having problems with a JavaTable... I have to click an Item in this table.. Because the table is dynamic I have to look for this item. I'm trying to look for it by comparing the text in the cell with the text I have to look for... If this they're equal then click on the cell.

    Here's my code:
    'count rows in table
    nRowTotal = td.Items.Count


    'count columns in the table
    column = 0
    ccounter = 1 'column counter

    For r = 1 To nRowTotal

    If td.SelectIndex(1, ccounter) = True Then
    test = td.Items(1).Item(ccounter)
    MsgBox test
    Do
    If td.Items(r).Item(ccounter) = psExpected Then
    sText = td.Items(r).Item(ccounter)
    MsgBox sText
    'bFound = True
    'sRecorded = sText
    r = r + 1
    MsgBox "Text of Row: " & r & " Column: " & ccounter & " is: " & td.Items(r).Item(ccounter)
    column = column + 1
    ccounter = ccounter + 1
    ce = 1
    Else
    ce = 0
    End If
    Loop Until ce = 0
    End If
    Next

    Here's the table...
    [image]http://s162.photobucket.com/albums/t265/mlcoolj/?action=view&current=JavaTable.jpg[/image]

    I have to click on items on the left table... Can anyone explain to me why I can't read the text in the cells?

    Thanks in advance!

  2. #2
    Senior Member
    Join Date
    Aug 2008
    Posts
    137
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Cannot read text from cell in JavaTable

    Have you attempted to use the .text or .capturetext methods?
    -Steve

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

    Re: Cannot read text from cell in JavaTable

    no, not yet, I'm going to give that a try.. I'll let you guys know how it went...

  4. #4
    Junior Member
    Join Date
    Oct 2009
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Cannot read text from cell in JavaTable

    Just tried that, but in vain... I can only capture the whole table but not the one line I need because it's dynamic thus won't stay on the same cordinates... [img]/images/graemlins/confused.gif[/img]

  5. #5
    Junior Member
    Join Date
    Jul 2009
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Cannot read text from cell in JavaTable

    Use the below code to select the particular value(X) from the javatable

    Dim mytable As TItems
    Dim Row As Object
    Dim i As Integer
    X As Variant
    X = 10
    JavaTable("Index=1").Attach
    Set mytable = JavaTable.Items
    For Each Row In mytable
    For i = 1 To (Row.Count)
    If X = (Row.Item(i)) Then
    JavaTable("Index=1").TextSelect X
    End If
    Next
    Next

 

 

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.34%
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 12:30 AM.

Copyright BetaSoft Inc.