国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費(fèi)電子書(shū)等14項(xiàng)超值服

開(kāi)通VIP
asp生成EXCEL文件的函數(shù)
<!--#include file="connection.asp"-->
<%call excel%>
sub excel
    sStartdate=request("sStartdate")
     dim rs,sql,filename,fs,myfile,x
     Set fs = server.CreateObject("scripting.filesystemobject")
     ‘--假設(shè)你想讓生成的EXCEL文件做如下的存放
     filename = Server.MapPath("../excel/"&sStartdate&"日?qǐng)?bào).xls")
     ‘--如果原來(lái)的EXCEL文件存在的話刪除它
     if fs.FileExists(filename) then
         fs.DeleteFile(filename)
     end if
     ‘--創(chuàng)建EXCEL文件
     set myfile = fs.CreateTextFile(filename,true)
     Set rs = Server.CreateObject("ADODB.Recordset")
     ‘--從數(shù)據(jù)庫(kù)中把你想放到EXCEL中的數(shù)據(jù)查出來(lái)
     sql = "select * from dayreport where date= "&sStartdate&""
     rs.Open sql,conn,1,1
    
     if rs.EOF and rs.BOF then
         ‘--------
    else
        dim strLine,responsestr
        strLine=""
        For each x in rs.fields
            strLine = strLine & x.name & chr(9)
        Next
        ‘--將表的列名先寫(xiě)入EXCEL
        myfile.writeline strLine    ‘EXCEL文件
        Do while Not rs.EOF
            strLine=""
            for each x in rs.Fields
                strLine = strLine & x.value & chr(9)
            next
            ‘--將表的數(shù)據(jù)寫(xiě)入EXCEL
            myfile.writeline strLine
            rs.MoveNext
         loop
     end if
     rs.Close
     set rs = nothing
     Response.Write "<script language=‘javascript‘>alert(‘成功生成EXCEL文件‘);location.href=‘dayreportlist.asp?action=query‘</script>"
    end sub
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
用ASP將數(shù)據(jù)庫(kù)中的數(shù)據(jù)直接導(dǎo)出到EXCEL表中
用ASP如何生成excel報(bào)表
asp代碼實(shí)現(xiàn)EXCEL數(shù)據(jù)導(dǎo)入到SQL數(shù)據(jù)庫(kù)
用ASP上傳Excel 表格并導(dǎo)入到數(shù)據(jù)庫(kù)
ASP生成HTML-另一篇
用jspsmartupload進(jìn)行上傳下載(數(shù)據(jù)庫(kù))
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服