SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 2 of 2
  1. #1
    Senior Member
    Join Date
    Jun 2004
    Location
    Miami,FL
    Posts
    949
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Excluding Empty rows from a table

    I have a table with 5 rows in which to are empty
    how to get the number of rows with data only
    I tried the below:

    tableRows=Browser("micClass:=Browser").Page("MicCl ***:=Page").WebTable("index:="&tableNumber).Ro wCount
    rowCounter=0
    For rowNumber = 0 To tableRows-1
    If Browser("micClass:=Browser").Page("MicClass:=Page" ).WebTable("index:="&tableNumber).GetCellData( rowNumber,3) <>"" Then
    msgbox Browser("micClass:=Browser").Page("MicClass:=Page" ).WebTable("index:="&tableNumber).GetCellData( rowNumber,3) ' this will show an Error message for the empty rows ; Error: The specified cell doesn't exist.

    rowCounter= rowCounter+1
    End If
    Next
    msgbox rowCounter ' I am still getting 5

    any idea on checking the existance of a cell or not counting the empty rows?
    "I realize it's an error, but no one is going to try to do that!"
    From "Top 10 Stupid Comments from Developers".

  2. #2
    Senior Member
    Join Date
    Jun 2004
    Location
    Miami,FL
    Posts
    949
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Excluding Empty rows from a table

    thanx guys , don't bother with this question because I fixed it.
    just used the below check
    If Browser("micClass:=Browser").Page("MicClass:=Page" ).WebTable("index:="&tableNumber).GetCellData( rowNumber,3) <>"ERROR: The specified cell does not exist." Then
    rowCounter = rowCounter+1
    End If
    "I realize it's an error, but no one is going to try to do that!"
    From "Top 10 Stupid Comments from Developers".

 

 

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 12.50%
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 01:12 PM.

Copyright BetaSoft Inc.