yo te puedo facilitar un codigo q lee .xls tenia un codigo q creaba . doc pero no lo encuentro y me parece que estaba escrito en asp clasico.
en fin, espero te sirva
Código vb:
Ver original<%@ Import Namespace="System.Data.OleDb" %>
<%@ Import Namespace="System.Data" %>
<%@ Page Language="VB" Debug="true" %>
<script runat="server">
Sub Page_Load()
Dim conAuthors As OleDbConnection
Dim cmdSelectAuthors As OleDbCommand
Dim dtrAuthors As OleDbDataReader
Dim dtblSchema As DataTable
conAuthors = New OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=C:\Inetpub\wwwroot\Logos\Prueba.xls; Extended Properties= Excel 8.0")
conAuthors.Open()
cmdSelectAuthors = New OleDbCommand("Select * From [Hoja1$]", conAuthors)
dtrAuthors = cmdSelectAuthors.ExecuteReader()
dtblSchema = dtrAuthors.GetSchemaTable() 'obtengo la table
dgrdSchema.DataSource = dtrAuthors 'asigno la tabla al datagrid
dgrdSchema.DataBind() 'asigno la tabla al datagrid
dtrAuthors.Close()
conAuthors.Close()
End Sub
</script>
<html>
<head><title>SqlGetSchemaTable.aspx</title></head>
<body>
<asp:DataGrid id="dgrdSchema" CellPadding="4" HeaderStyle-BackColor="lightgreen" Runat="Server" />
</body>
</html>