麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁(yè) > 學(xué)院 > 開(kāi)發(fā)設(shè)計(jì) > 正文

ASP生成輸出DOC(Word文件)

2019-11-17 04:13:51
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友

< %
const lie=3    '修改列數(shù)
const tablewidth="33%" '定義表格的寬度
const tableheight="18%" '定義表格的高度
const imgwidth="15%" '定義表格的寬度
const imgheight="27.5%" '定義表格的高度
const fontsize="12px;" '定義文字的大小
const txtwidth="120"    '圖片右側(cè)文字表格寬
const txtheight="18%"    '圖片右側(cè)文字表格高
const txtalign="left"    '圖片右側(cè)文字對(duì)齊方式:left左,center中,right右

'TOP 強(qiáng)調(diào)該文件為Word文件
function doctop()
    doctop="<html xmlns:v=""urn:schemas-microsoft-com:vml"" xmlns:o=""urn:schemas-microsoft-com:office:office"" xmlns:w=""urn:schemas-microsoft-com:office:word"" xmlns="">生成結(jié)果</title><meta http-equiv=Content-Type content=""text/html; charset=gb2312""></meta><meta name=PRogId content=Word.Document></meta><meta name=Generator content=""Microsoft Word 10""></meta><meta name=Originator content=""Microsoft Word 10""><style type=""text/CSS"">@page Section1{margin:30pt 8.5pt 5.65pt 12pt;}div.Section1{page:Section1;}table{font-size:"&fontsize&"}</style></meta></head>"+chr(13)+chr(10)
end function

function imgtotable(fto,fpar,dext)
    imgtotable="<table width="&tablewidth&" height="&tableheight&" border=0>"
    imgtotable=imgtotable+"<tr valign=""top""><td><img src="""&replace(demo,fpar,"")&""" width="""&imgwidth&""" height="""&imgheight&"""/></td>"
    imgtotable=imgtotable+"<td colspan=""2"" align=""center"">"
    imgtotable=imgtotable+"<table width="&txtwidth&" height="&txtheight&"><tr><td align="""&txtalign&""">"&replace(lcase(fto.name),"."&dext,"")&"</td></tr><tr><td align="""&txtalign&""">演員</td></tr><tr><td align="""&txtalign&""">語(yǔ)言</td></tr><tr><td align="""&txtalign&""">容量</td></tr><tr><td align="""&txtalign&""">類(lèi)型</td></tr></table>"
    imgtotable=imgtotable+"</td></tr></table>"+chr(13)+chr(10)
end function


function imagetodoc(fpath,fpar)
    set fto=fso.createtextfile(fpath&"/運(yùn)行結(jié)果.doc",True)
    fto.writeline doctop()
    fto.writeline "<body topmargin=0 leftmargin=0><table width=""64"" height=""100%"" border=1><div class=Section1>"
    for each demo in fpath.files
        dext=Lcase(fso.getExtensionName(demo))
        if dext="jpg" or dext="gif" or dext="png" then
            if (i mod lie)=0 then fto.writeline "    <tr>"+chr(13)+chr(10)
            i=i+1
            fto.writeline "<td>"
            '用于排錯(cuò)
            'fto.writeline "123"
            fto.writeline imgtotable(demo,fpar,dext)
            fto.writeline "</td>"+chr(13)+chr(10)
            if (i mod lie)=0 then i=0:fto.writeline "    </tr>"+chr(13)+chr(10)
        end if
    next
    fto.close
    response.write "</div></table></body>"
    response.write ""&fpo&fpath&"/運(yùn)行結(jié)果.doc"" 生成完畢。<br />"
    set fto=nothing
end function

set fso=server.createobject("scrset fpo=fso.getfolder(server.mappath("./"))
for each demo in fpo.subfolders
    call imagetodoc(demo,"")
next
set fpo=nothing
set fso=nothing
%>


發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 在线观看福利网站 | 91一区二区在线观看 | 蜜桃网站在线观看 | 91九色视频在线播放 | 亚洲九九色 | 午夜影视一区二区 | 久草视频免费 | 在线观看一区二区三区四区 | 成人一级在线 | 免费国产视频大全入口 | 中午字幕无线码一区2020 | 黄色网址进入 | 久久99网 | 成人视屏网站 | 黄色成人小视频 | 久久精品成人影院 | 日本黄色大片免费 | 最新一级毛片 | 国产午夜精品久久久久 | 久久艹国产精品 | 欧美日韩在线看片 | 欧美一级黄色录像片 | 视频久久免费 | 欧美视频在线一区二区三区 | 亚洲性综合网 | 午夜视频在线观看免费视频 | 欧美四级在线观看 | 韩国十九禁高潮床戏在线观看 | 国产1区在线观看 | www.99热精品 | 亚洲精品午夜在线 | 99爱视频在线观看 | 久久久亚洲欧美综合 | 九九热视频在线免费观看 | 成人在线免费小视频 | 中国洗澡偷拍在线播放 | 久久美女色视频 | 国产日韩久久久久69影院 | 久久久午夜电影 | 欧美一级免费在线观看 | 91短视频版高清在线观看免费 |