<script language="vbscript">
Set xlApp = CreateObject("Excel.Application")
strsource="d:\jsp_user.xls"
Set xlbook=xlApp.Workbooks.Open(strsource)
Set xlsheet=xlbook.Worksheets(1)
strName=""
strSql="begin " & chr(13)
for i=2 to 50
strName=trim(xlsheet.Cells(i,1))
if strName<>"" then
strSql=strSql & "insert into jsp_user(username,password,info) values('" & xlsheet.Cells(i,1)
& "','" & xlsheet.Cells(i,2) & "','" & xlsheet.Cells(i,3) & "')" & chr(13)
end if
next
strSql= strSql & "end" & chr(13)
window.document.write(strSql)
</script>
Set xlApp = CreateObject("Excel.Application")
strsource="d:\jsp_user.xls"
Set xlbook=xlApp.Workbooks.Open(strsource)
Set xlsheet=xlbook.Worksheets(1)
strName=""
strSql="begin " & chr(13)
for i=2 to 50
strName=trim(xlsheet.Cells(i,1))
if strName<>"" then
strSql=strSql & "insert into jsp_user(username,password,info) values('" & xlsheet.Cells(i,1)
& "','" & xlsheet.Cells(i,2) & "','" & xlsheet.Cells(i,3) & "')" & chr(13)
end if
next
strSql= strSql & "end" & chr(13)
window.document.write(strSql)
</script>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货