23-02-22 11:12 AM
"Provider=Microsoft.ACE.OLEDB.12.0;Data Source="&[Excel-file path]&";Extended Properties=""Excel 12.0 Xml;HDR=YES;"""
"SELECT * FROM [SHEET1$]"
Internal : Could not execute code stage because exception thrown by code stage: Invalid argument.
ERROR: Internal : Could not execute code stage because exception thrown by code stage: Could not find installable ISAM.
23-02-22 11:33 AM
23-02-22 05:31 PM
Public Function ExcelSheetRead(ByVal filepath as String,sheetname as string) As DataTable
Dim dt As DataTable = New DataTable()
Dim Con As OleDbConnection = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;" & "Data Source=" & filepath & ";Extended Properties=Excel 12.0;")
Con.Open()
Try
Dim oCon As OleDbCommand = New OleDbCommand("Select * from [" & sheetname & "$]",Con)
Dim adp As OleDbDataAdapter = New OleDbDataAdapter(OCon)
adp.Fill(dt)
Catch e_ As Exception
End Try
Con.Close()
Return dt
End Function