(100分)OLEDB 读取Excel问题

yqlx521 2010-10-07 05:36:55
我在用OLEDB读取excel的时候 excel的第一列为 DataNo
//指定sheet名
strExcel = "select * from [" + strTableNames[0] + "]";
这个语句后面可以写where条件不
可以的话 假如 where DataNo != null 怎么写
谢谢大家
...全文
50 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
yqlx521 2010-10-08
  • 打赏
  • 举报
回复
谢谢大家 昨天用linq弄了下 看来还是这么写简单
wuyq11 2010-10-07
  • 打赏
  • 举报
回复
select * from [" + tableName + "] where 列 is not null
Extended Properties='Excel 8.0;HDR=YES;IMEX=1';";//HDR为yes 则第一数据行为列名,为no 则自动为列加列名F1 F2 F3
wuchuangxin1998 2010-10-07
  • 打赏
  • 举报
回复
答案很对 就是那样
叶子 2010-10-07
  • 打赏
  • 举报
回复

where DataNo != null --这个不对

--如果要判断非空的话:

where DataNo is not null

110,561

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧