Click here to Skip to main content
15,889,861 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Guys,

I am accessing Excel sheet from my C# Code.
I am storing all rows in DataSet.

But I have a problem.
After getting entire Excel contents in DataSet I am getting some empty rows also.
Is there any short cut to remove that empty rows in DataSet?
I can use loop or I can dump into other Dataset but other than this any method.

I'm using Ms-Sql

[edit]Spurious code block removed, spelling and some capitalisation - OriginalGriff[/edit]
Posted
Updated 15-Feb-11 23:29pm
v3
Comments
Dalek Dave 16-Feb-11 5:29am    
Edited for Grammar and Readability.

Hang on a moment: Your name is Alim Basha and you posted exactly the same question on MSDN in 2007.
http://social.msdn.microsoft.com/Forums/en/adodotnetdataproviders/thread/0385aa4a-1db2-41e6-8431-f0a2835ae317[^]

And when I say "exactly the same question" I mean just that: capitalisation errors, spelling error, exact wording and format, the lot.

What is going on here?

BTW: change your username: never post your email to a public forum.
 
Share this answer
 
Comments
Indivara 16-Feb-11 7:42am    
Just a minute Sherlock, how do you figure its the same person?
(I don't see the connection... am I blind?)
OriginalGriff 16-Feb-11 8:25am    
Would you copy-and-paste that question? Or write your own if you have the same problem? Or even - shock idea - read further down past the original question for the solutions? :laugh:
while selecting data from excel remove empty rows by select query giving condition like columnname <>string.Empty
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900