Forums
New posts
Search forums
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
C# Community
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Database
OLEDB
could not find installable ISAM in "MyCommand.Fill(DtSet)" line
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="kasimacsys, post: 159311, member: 23852"] Public Function ImportExcel2DataTable() As DataTable Dim MyConnection As System.Data.OleDb.OleDbConnection = New System.Data.OleDb.OleDbConnection Dim DtTable As New DataTable Dim strShetname As String Dim DtSet As System.Data.DataSet Dim MyCommand As System.Data.OleDb.OleDbDataAdapter Dim PrmPathExcelFile As String = System.IO.Directory.GetCurrentDirectory MyConnection = New System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; " & _ "Data Source=D:\Book1.xls; " & "Extended Properties=""Excel 12.0 Xml;HDR=YES""") Dim oApp As New Excel.Application Dim oBooks As Excel.Workbooks = oApp.Workbooks Dim oBook As Excel.Workbook = oBooks.Add("D:\Book1.xls") Dim oSheet As Excel.Worksheet = oApp.ActiveSheet strShetname = oSheet.Name MyCommand = New System.Data.OleDb.OleDbDataAdapter("select * from [" & strShetname & "$]", MyConnection) MyCommand.TableMappings.Add("Table", "Fusion") DtSet = New System.Data.DataSet MyCommand.Fill(DtSet) MyConnection.Close() DtTable = DtSet.Tables(0) Dim AddaRow As DataRow = DtTable.NewRow DtTable.Rows.InsertAt(AddaRow, 0) ImportExcel2DataTable = DtTable End Function In the above i receive error could not find installable ISAM in "MyCommand.Fill(DtSet)" line [/QUOTE]
Insert quotes…
Verification
Post reply
Database
OLEDB
could not find installable ISAM in "MyCommand.Fill(DtSet)" line
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top
Bottom