如何将文件检索到datagridview中? [英] how to retrieve a file into datagridview?

查看:72
本文介绍了如何将文件检索到datagridview中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以教我如何将数据文件检索到datagridview吗?

May someone teach me how to retrieve a file of data into datagridview?

推荐答案



DataGridView以表格形式显示数据.因此,您的文件应为Excel或CSV,以网格形式显示数据.

让我给您一些链接,以便从excel文件生成数据表.您可以将数据表与datagridview绑定,

http://forums.asp.net/t/1255191.aspx/1 [ ^ ]

选中此项以将excel读入数据表 [ ^ ]

祝你好运.
Hi,

DataGridView display data in tabular form. So your file should be either Excel or CSV to display data in grid form.

Let me give you some links to generate datatable from excel file. you can bind datatable with datagridview,

http://forums.asp.net/t/1255191.aspx/1[^]

Check this for excel reading into datatable[^]

Best luck.


这篇关于如何将文件检索到datagridview中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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