
excel
% set rs=server.CreateObject(adodb.recordset) update_sql=select xingming,b,c,d from biao rs.open update_sql,conn,2,3 Set xlApp = server.CreateObject(excel.Application) strsource = server.mappath(1.xls) Set xlbook = xlApp.Workbooks.Open(strsource) Set xlsheet= xlbook.Worksheets(1) i=1 do while (not xlsheet.cells(1,i)=) i=i+1 loop ii=i-1 RecNo=1 j=2Do While (xlsheet.cells(j,1)) rs.addnew i=1 for i=1 to ii rs(i-1)=xlsheet.cells(j,i) next j=j+1 rs.update RecNo=RecNo+1 Loopif err.number=0 then response.Write() end if rs.close set rs=nothing set db=nothing xlBook.Close (True) '关闭工作簿 xlApp.Quit '结束excel对象 Set xlApp = Nothing '释放xlApp对象%
Copyright © 2025 IZhiDa.com All Rights Reserved.
知答 版权所有 粤ICP备2023042255号