Read the data in the Excel file into the DataGrid

zhaozj2021-02-11  195

Read the data in the Excel file into the DataGrid

Using the Excel file as a data source of DataGrid is very simple, once the data is loaded, you can save the data to SQL Server or XML. We only need to simply use Ole DB Provider to access the Excel file, and then return to DataSet. Below is the Excel Data Contact.xls to display:

Name

gender

address

NET_LOVERMALEAMXH @ 21cn.com @ 21cn.com Mencius E Chapter MaleAmxh@21cn.com

<% @ Page language = "c #" debug = "true"%>

<% @ Import namespace = "system.data"%>

<% @ Import namespace = "system.data.oledb"%>