?
Solved

deleting empty rows from the data table...

Posted on 2006-07-06
1
Medium Priority
?
1,527 Views
Last Modified: 2012-06-27
Hi,
 I have a data table which has some Empty rows in it... I just wanna delete those empty rows...
(Filled the data table from Excel sheet, which has some empty rows in it...)

Problem sounds simple, but was not able to figure out... :(

Thank You,
Steve
0
Comment
Question by:steve_mick972
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 14

Accepted Solution

by:
Ramuncikas earned 2000 total points
ID: 17053092
That depends on what a term "empty" covers. If "empty" means that field "Name" has an empty string as a value then you can do it like this:

Dim i as long
i = 0
While i <= myTable.Rows.Count -1
   if myTable.Rows(i)("Name") = String.Empty Then
      myTable.Rows.RemoveAt(i)
   Else
      i += 1
   End if
End while
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question