asp生成帶有樣式的word文件方法
更新時間:2008年09月20日 01:02:12 作者:
讓asp生成帶有樣式的word文件,如字體顏色為紅色,加粗,字號為36號的文字
復制代碼 代碼如下:
< %
Set fso=Server.CreateObject("Scripting.FileSystemObject")
str="<html><title>asp生成word文件舉例</title><body><span style='color:#ff0000;font-size:36px; font-weight:bold;'>歡迎光臨www.dbjr.com.cn(腳本之家)</span></body></html>"
filename= "2008.doc"
Set act = fso.CreateTextFile(server.mappath(filename), true)
act.WriteLine(str)
act.close
Set fso=Nothing
response.write "生成Word文件成功"
% >
相關文章
ASP基礎入門第十篇(ASP內(nèi)建對象Server)
這篇文章主要介紹了ASP內(nèi)建對象Server的相關資料,需要的朋友可以參考下2015-10-10asp中利用xmlhttp抓取網(wǎng)頁內(nèi)容的代碼
抓取網(wǎng)頁。偶要實現(xiàn)實實更新天氣預報。利用了XMLHTTP組件,抓取網(wǎng)頁的指定部分,其實很多的小偷程序要更好用2012-10-10