Solved

deleting empty rows from the data table...

Posted on 2006-07-06
1
1,519 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
1 Comment
 
LVL 14

Accepted Solution

by:
Ramuncikas earned 500 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now