本文介绍了如何通过C#获取工作表中某一列的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我编写了一个winform应用程序,该应用程序可以打开并从excel文件表中读取数据.我使用OleDbDataAdapter读取数据,然后将数据设置为数据表.但我的问题是,在此数据表中,数据的第一行用作列的名称,但是我想使用excel为每列定义的基本名称(我的意思是"ABC ... AA AB ...",
I have wrote a winform application that can open and read from a sheet of an excel file.I have used OleDbDataAdapter to read data and then set the data to a datatable. but my problem is that in this datatable the first row of data is used as the name of the columns however i want to use the base names that excel defines for each column (I mean "A B C ... AA AB ..." and so on).
推荐答案
这篇关于如何通过C#获取工作表中某一列的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!