欢迎来到天天文库
浏览记录
ID:48452990
大小:61.01 KB
页数:12页
时间:2020-01-31
《asp中表格导出到EXCEL的方法的讨论.doc》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、asp中表格导出到EXCEL的方法一、第一种表格导出到Word代码、导出到EXCEL代码浏览器表格导出到Exce
2、l代码 3、 11 11 22 22 33 33 44 44导出到Word代码SubbuildDocsettable=document.all.datarow=table.rows.lengthcolumn=table.rows(1).cells.l
3、
6、engthSetobjWordDoc=CreateObject("Word.Document")'objWordDoc.Application.Documents.AddtheTemplate,FalseobjWordDoc.Application.Visible=TrueDimtheArray(20,10000)fori=0torow-1forj=0tocolumn-1theArray(j+1,i+1)=table.rows(i).cells(j).innerTEXTnextnexto
7、bjWordDoc.Application.ActiveDocument.Paragraphs.Add.Range.InsertBefore("综合查询结果集")//显示表格标题objWordDoc.Application.ActiveDocument.Paragraphs.Add.Range.InsertBefore("")SetrngPara=objWordDoc.Application.ActiveDocument.Paragraphs(1).RangeWithrngPara.Bold=T
8、rue//将标题设为粗体.ParagraphFormat.Alignment=1//将标题居中.Font.Name="隶书"//设定标题字体.Font.Size=18//设定标题字体大小EndWithSetrngCurrent=objWordDoc.Application.ActiveDocument.Paragraphs(3).RangeSettabCurrent=ObjWordDoc.Application.ActiveDocument.Tables.Add(rngCurrent,row,c
此文档下载收益归作者所有