如何将文件检索到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.