VB.Net Code ---------------------------------------------- <%@ Page Language="VB" %> <%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Data.ADO" %> <script language="VB" runat="server"> Sub Page_Load(sender As Object, e As EventArgs) Dim myDataset As New DataSet() Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;" _ & "Data Source=C:\Exceltest.xls;" _ & "Extended PropertIEs=""Excel 8.0;""" Dim myADODataSetCommand As New ADODataSetCommand("SELECT * FROM [Sheet1$]", strConn) myADODataSetCommand.TableMappings.Add("Table", "ExcelTest") myADODataSetCommand.FillDataSet(myDataset) DataGrid1.DataSource = myDataset.Tables(0).DefaultVIEw DataGrid1.DataBind() End Sub </script> <p><asp:Label id=Label1 runat="server">Excel表格內容:</ASP:Label></p> <ASP:DataGrid id=DataGrid1 runat="server"/>