Skip to Content
0
Former Member
Mar 13, 2013 at 02:15 PM

Error - Invalid Name

24 Views

Hi

In the below code , it is giving me error [Temp$] is not Valid Name .

Dim cnn As String

cnn = ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Temp.XLS;Extended Properties=Excel 8.0")

Dim ds As New DataSet

Dim dt As New DataTable

Dim excelcnn As New System.Data.OleDb.OleDbConnection(cnn)

Dim excelqry As String

excelqry = "Select * from [TEMP$]"

Thanks