tags:

views:

1183

answers:

1

Hi All,

I have data in excel sheet that has two columns and 10 rows. Some of the rows for First column has blank value. Excel shows it as (blank) on putting aut filter on colunm

I am querying the excel sheet from C# 2.0 to find out if first column contains a blank.

select * from [Sheet1$] where [Myname] = \"\"";

The above query is not returning any records, so I tried the query below.

select * from [Sheet1$] where [Myname] = \" \"";

This either is not returning any rows. I also tried with value NULL in the where clause , but it is also not working.

Can anyone help me to write the correct query to check for blank fields in excel?

Thanks

+1  A: 
select * from [Sheet1$] where [Myname] IS NULL

This seems to work fine using System.Data.OleDb.

cxfx