Here is a simple piece of ASP import Excel data to save to other data such as MSSQL access MySQL, etc. oh, well, crap don't say much to see the following code.
<!--#include file= "adoconn.asp"-->
<%
Set xlsconn = server. CreateObject ("Adodb.connection")
Set Rs=server. CreateObject ("Adodb.recordset")
Source1=server.mappath ("..") & "" &replace (Request ("path"), "/", "" "
Myconn_xsl= "Provider=Microsoft.Jet.OLEDB.4.0;Data source=" "&source1&"; Extended Properties=excel 8.0 "
Xlsconn.open myconn_xsl
Sql= "SELECT * FROM [Product List $]"
Set Rs=xlsconn.execute (SQL)
If not rs.eof then
While not rs.eof
Names=rs ("Commodity name")
Pic=rs ("Picture")
sql= "INSERT into [Product] (Namese,pic) VALUES ('" & Names & "', '" & Pic & ")"
Conn.execute (SQL)
Rs.movenext
Wend
End If
Response.Write "Import Succeeded"
End If
%>
Data connection file <!--#include file= "adoconn.asp"-->
Set Rs=server. CreateObject ("Adodb.recordset")
db= "... /database/db11.mdb "
Set Conn=server. CreateObject ("Adodb.connection")
connstr= "Provider=Microsoft.Jet.OLEDB.4.0;Data source=" & Server.MapPath ( db)
Conn.Open connstr