积极答复者
WinForm中怎样导入Excel表中的数据到DataSet并在reportViewer中显示出来?

问题
答案
-
建议使用NPOI之类的类库将Excel数据读取,转换成DataSet对象之后再进行操作
- 已标记为答案 CaillenModerator 2015年5月19日 6:13
-
你好:
最简单的办法是通过ADO.NET的方法连接Excel文件,通过OleDbDataAdapter填充DataSet,参考以下文章中的示例代码:
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- 已标记为答案 CaillenModerator 2015年5月19日 6:13
-
hi,
NPOI作者另外推出了Toxy,可直接轉成DataSet
你要注意的是excel的版本,excel 2007以前是*.xls,以後是用*.xlsx
NPOI已经可以支援excel 2003~2007
https://npoi.codeplex.com/documentation
http://www.leniel.net/2009/07/creating-excel-spreadsheets-xls-xlsx-c.html
http://blog.neuzilla.com/page/2/
https://toxy.codeplex.com/
秘訣無它,唯勤而已 http://www.dotblogs.com.tw/yc421206/
- 已编辑 余小章MVP 2015年5月15日 2:21
- 已标记为答案 CaillenModerator 2015年5月19日 6:13
全部回复
-
建议使用NPOI之类的类库将Excel数据读取,转换成DataSet对象之后再进行操作
- 已标记为答案 CaillenModerator 2015年5月19日 6:13
-
你好:
最简单的办法是通过ADO.NET的方法连接Excel文件,通过OleDbDataAdapter填充DataSet,参考以下文章中的示例代码:
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- 已标记为答案 CaillenModerator 2015年5月19日 6:13
-
hi,
NPOI作者另外推出了Toxy,可直接轉成DataSet
你要注意的是excel的版本,excel 2007以前是*.xls,以後是用*.xlsx
NPOI已经可以支援excel 2003~2007
https://npoi.codeplex.com/documentation
http://www.leniel.net/2009/07/creating-excel-spreadsheets-xls-xlsx-c.html
http://blog.neuzilla.com/page/2/
https://toxy.codeplex.com/
秘訣無它,唯勤而已 http://www.dotblogs.com.tw/yc421206/
- 已编辑 余小章MVP 2015年5月15日 2:21
- 已标记为答案 CaillenModerator 2015年5月19日 6:13