Quantcast
Channel: Fórum ASP
Viewing all articles
Browse latest Browse all 1214

Importar XLS de novo

$
0
0

Ai galera to com um problema na hora de importar o XLS para o banco  estou fazendo assim

		dim strTitulo,strTexto,strNew, Conexao, strSql,myVal
		strCaminho=	"C:\inetpub\wwwroot\automatiza\vivo\"&vItensMarcado(i) 


		Set Conn = CreateObject("ADODB.Connection")
		Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source="& strCaminho &";" & "Extended Properties=Excel 8.0;"
		
		Set objTable = Server.CreateObject("ADOX.Catalog")
		objTable.ActiveConnection = Conn
		nomeAba="Demonstrativo da Fatura"
		for j = 1 to objTable.tables.count - 3
			nomeAba2 = REPLACE(mid(objTable.tables(j).Name,1,len(nomeAba)+1),"'","")
			aba=replace(objTable.tables(j).Name,"'","")
			aba=replace(objTable.tables(j).Name,"$","")
			''response.write(nomeAba2 & "<br>")
			if trim(nomeAba) = trim(nomeAba2) then
				Set objRs = Conn.Execute("SELECT * FROM [" & aba & "] ")

da o seguinte erro nesta linha Set objRs = Conn.Execute("SELECT * FROM [" & aba & "] ")

 

Microsoft JET Database Engine error '80040e37'

The Microsoft Jet database engine could not find the object ''Demonstrativo da Fatura 1''. Make sure the object exists and that you spell its name and the path name correctly.

/automatiza/importa_vivo.asp, line 69

 


Viewing all articles
Browse latest Browse all 1214