问题
I start to use OleDB. I'm trying to extract a large range of random data from an Excel file (in C#). This my query :
SELECT * FROM NAMED_RANGE
But I have a lot of empty rows. I delete them in a loop but I don't really like it, is it possible to select only rows with at least one cell filled ?
Best regards,
Alex
回答1:
Simply change the SQL Query:
SELECT * FROM NAMED_RANGE WHERE [YourColumnTitle] IS NOT NULL
Or if [F1] is your Column:
SELECT * FROM NAMED_RANGE WHERE F1 IS NOT NULL
Thanks to mr.Reband
来源:https://stackoverflow.com/questions/17149948/how-can-i-dodge-empty-rows-in-an-excel-file-with-oledb