Dim SheetList As System.Data.DataTable =
conn.GetOleDbSchemaTable(System.Data.OleDb.OleDbSc hemaGuid.Tables, New
object() { Nothing, Nothing, Nothing, "TABLE"})
' here, we get the name of the first (0th) sheet
SheetName= "[" & SheetList.Rows(0)("TABLE_NAME").ToString()
& "]"
"Randy" <an*******@discussions.microsoft.com> wrote in message
news:06****************************@phx.gbl...
In ASP I used the following Code to get the table name
from a XL db. I have been looking how to do this in .NET
and can't seem to find it. Can any of you guys help me
out.
strTable = getXLName(XLConn)
Function getXLName(obj)
SET RsN = obj.OpenSchema(20)
getXLName = RsN("TABLE_NAME")
RsN.Close
End Function