使用Oledb提供程序将数据从excel文件存储到DataSet中 [英] storing data into DataSet from excel file using Oledb provider

查看:76
本文介绍了使用Oledb提供程序将数据从excel文件存储到DataSet中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将使用asp.net c#应用程序中的Oledb提供程序将数据从excel文件存储到DataSet中.

查询:SELECT * FROM [Sheet1 $]

一切工作正常,但我担心的是应该跳过第一行,而第二行用于标题,其余用于数据行.

我需要紧急帮助.

感谢

I''m storing data into DataSet from excel file using Oledb provider in asp.net c# application.

query: SELECT * FROM [Sheet1$]

everything is working fine but my concern is that 1st row should be skiped and 2nd row should be used for heading and rest for datarow.

I need help on urgent basis.

thanks

推荐答案



一切工作正常,但我担心的是应该跳过第一行,而第二行用于标题,其余用于数据行.

我需要紧急帮助.

谢谢


everything is working fine but my concern is that 1st row should be skiped and 2nd row should be used for heading and rest for datarow.

I need help on urgent basis.

thanks


您可以尝试定义范围.像这样的东西:
You could try defining the range. Something like:
SELECT * FROM [Sheet1


A2:X999]


这篇关于使用Oledb提供程序将数据从excel文件存储到DataSet中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆