Because didn't contact with for a long time, the basic and forgotten, a pile of search on the net out cannot achieve,
Problems which have ready-made can be used, can contribute the


The table name: usertable
Fields: name (name), idno (id), tel01 (telephone), tel02 (telephone), drtime (import time, automatically collect now value), datatype (customer type)
CodePudding user response:


CodePudding user response:
SQLserver2000 bring import Excel function (as long as the corresponding field can), if stubbornly ASP after read write to also go, but it's trouble,CodePudding user response:
Fileall=""The Set cn=Server. CreateObject (" ADODB. Connection ")
Cn. The Provider="Microsoft. Jet. The OLEDB. 4.0"
Cn. The ConnectionString="Data Source=" & amp; Filepath& "; "& amp;" Extended Properties=8.0 Excel;"
Cn. Open
'SQL="select * from [sheet1 $]"
SQL="select * from [$A1: R65536]"
Rs. The open SQL, cn, 1, 1
Eof
the Do While Not rs.If the rs (rs) Fields (z). The name) & lt;>" "Then
For z=0 to rs. Fields. The count - 1
Fileall=fileall& Rs (rs) Fields (z). The name) & amp; CRH (9)
Next
Fileall=fileall& CRH (10)
Rs. Movenext
The else
The exit do
End the if
Loop
Rs. Close
Cn. Close
The set cn=nothing
CodePudding user response:
1, upload the EXCEL file2, read the EXCEL file a table to a DataSet
3, read the DataSet, line by line insert essentially a database
CodePudding user response:
Well, NPOI read EXCEL insert data table is goodCodePudding user response:
Asp three small cases about operation excelhttp://bbs.ttasp.com/forum.php? mod=viewthread& Tid=122 & amp; Fromuid=3
(source: everyday ASP home)