| 订阅 | 在线投稿
分享
 
 
当前位置: 王朝网络 >> asp >> asp sheng cheng excel bao biao

asp sheng cheng excel bao biao

2008-10-25 09:18:37 编辑來源:互联网 评论
 
 
 
本文为【asp生成excel报表】的拼音翻译版
  1. qian yan
  bao biao da yin tong chang shi guan li xin xi xi tong zhong de yi ge chong yao mo kuai , er Excel ping jie ta gong neng qiang da 、 ying yong ling huo 、 tong yong xing qiang deng de you shi zai bao biao da yin zhong huo de le guang fan de ying yong 。
  zui chu de guan li xin xi xi tong ji ben shang shi cai yong ke hu ji / fu wu qi (C/S) mo shi kai fa de , dan sui zhe WWW de guang fan ying yong , mu qian de guan li xin xi xi tong yi jing zhu jian kai shi cong C/S mo shi xiang liu lan qi / fu wu qi (B/S) mo shi zhuan bian 。B/S mo shi ju you chuan tong C/S mo shi suo bu ji de hen duo te dian , ru geng jia kai fang 、 yu ruan ying jian wu guan 、 ying yong kuo chong he xi tong wei hu sheng ji fang bian deng deng , mu qian yi cheng wei qi ye wang shang shou xuan de ji suan mo shi , yuan xian zai C/S xia de hen duo ruan jian dou kai shi yi zhi dao B/S mo shi xia 。 you yu B/S mo shi de te shu xing , zai C/S xia xiang dui jiao yi shi xian de Excel bao biao da yin gong neng zai B/S xia que cheng wei yi ge nan dian 。 ben wen gen ju zai shi ji de xiang mu zhong zong jie de jing yan , yi ASP wei li , gei chu le yi ge jiao hao de tong yong fang fa 。
  2. gong neng shi xian
  wei le shuo ming wen ti , zhe li ju yi ge li zi 。 xi tong ping tai shi Windows 2000+SQL Server 2000+IIS 5.0+ASP 3, bao biao cai yong de shi Excel, yao qiu an zhao gei ding de bao biao ge shi sheng cheng tu shu xiao shou tong ji de bao biao , bing neng gou da yin 。
  2.1 Excel bao biao mo ban de zhi zuo
  shou xian gen ju gei ding de bao biao ge shi , zhi zuo yi ge Excel mo ban ( jiu shi yao da yin de bao biao de biao ge ), dang ran qi zhong xu yao cong shu ju ku zhong dong tai tong ji sheng cheng de shu ju liu zhe kong bai 。 zhe ge bao biao xian zai Excel zhong hua hao , ran hou bao cun wei mo ban , cun fang zai qi lai , zhe li wei \test\book1.xlt。
  2.2 Excel bao biao de sheng cheng yu da yin
  zhe li cai yong le Excel de Application zu jian , gai zu jian zai an zhuang Excel shi an zhuang dao xi tong zhong 。 wo men de cao zuo ye dou shi zhen dui gai zu jian 。
  (1) jian li Excel.Application dui xiang
  set objExcel=CreateObject("Excel.Application")
  (2) da kai Excel mo ban
  objExcel.Workbooks.Open(server.mappath("\test")&"\book1.xlt") ' da kai Excel mo ban
  objExcel.Sheets(1).select ' xuan zhong gong zuo ye
  set sheetActive=objExcel.ActiveWorkbook.ActiveSheet
  (3) Excel de chang gui tian jia cao zuo
  li ru sheetActive.range("g4").value=date() ‘ zhe li tian jia de shi shi jian , dang ran ye ke yi shi ni zhi ding de ren he shu ju
  (4) Excel zhong tian jia shu ju ku zhong de ji lu
  zhe li jia she yi you yi ge shu ju ji adoRset, cun fang you Sql cao zuo sheng cheng de tong ji shu ju 。
  num=7 ‘ cong Excel de di qi xing kai shi
  do until adoRset.EOF ‘ xun huan zhi zhi shu ju ji zhong de shu ju xie wan
  strRange="d"&num&":f"&num ‘ she ding yao tian xie nei rong de dan yuan qu yu
  sheetActive.range(strRange).font.size=10 ‘ she ding zi ti da xiao
  sheetActive.range(strRange).WrapText=false ‘ she ding wen zi hui juan
  sheetActive.range(strRange).ShrinkToFit=true ‘ she ding shi fou zi dong shi ying biao ge dan yuan da xiao
  sheetActive.range(strRange).value=array(adoRset("bookid"),adoRset("bookname"),adoRset("author")) ‘ ba shu ju ji zhong de shu ju tian xie dao xiang ying de dan yuan zhong
  num=num+1
  adoRset.MoveNext
  loop
  (5) Excel lin shi bao biao wen jian de bao cun ji chu li
  shi ji yun xing zhong ying gai zhu yi mei ci yi ge yong hu jin xing bao biao da yin shi dou cai yong yi ge lin shi de Excel wen jian , er bu shi ying xing gui ding wen jian ming , yin wei ru guo yong gu ding de wen jian ming de hua , zhi you di yi ci sheng cheng shi cheng gong de , hou mian de cao zuo dou hui yin wei yi cun zai tong ming wen jian er dao zhi shi bai 。 suo yi wo men xu yao mei ci dou chan sheng yi ge lin shi de er qie bu chong fu de wen jian ming , zhe li ke yi cai yong zi ding yi de getTemporaryFile() han shu you lai sheng cheng , ran hou cun fang zai bian liang filename zhong , yong bian liang filepos biao shi zhe xie lin shi wen jian de lu jing 。
  ci wai ru guo zhe xie lin shi wen jian bu chu li de hua jiu er jiu zhi hui cheng wei wen jian la ji , yin ci zai mei ge yong hu ti jiao Excel bao biao da yin qing qiu shi yao xian shan chu lin shi mu lu xia suo you yuan xian chan sheng de lin shi da yin wen jian 。
  lin shi wen jian de chu li zhu yao dai ma ru xia :
  function getTemporaryFile(myFileSystem)
  dim tempFile,dotPos
  tempFile=myFileSystem.getTempName
  dotPos=instr(1,tempFile,".")
  getTemporaryFile=mid(tempFile,1,dotPos)&"xls"
  end function
  set myFs=createObject("scripting.FileSystemObject")
  filePos=server.mappath("\test") & "\tmp\" ' yao cun fang da yin lin shi wen jian de lin shi mu lu
  fileName=getTemporaryFile(myFs) ' qu de yi ge lin shi wen jian ming
  myFs.DeleteFile filePos&"*.xls" ' shan chu gai mu lu xia suo you yuan xian chan sheng de lin shi da yin wen jian
  set myFs=nothing
  Excel lin shi wen jian de bao cun dai ma wei :
  objExcel.ActiveWorkbook.saveas filePos&filename
  (6) tui chu Excel ying yong
  objExcel.quit
  set objExcel=Nothing
  (7) Excel bao biao de da yin
  qian mian de bu zhou yi jing sheng cheng le Excel bao biao , xia yi bu jin xing da yin , cai yong de ce lue ke yi you liang zhong :
  fang an yi : ti gong shang mian sheng cheng de Excel bao biao lin shi wen jian lian jie gei yong hu , yong hu ke yi zhi jie dian ji zai liu lan qi zhong da kai Excel bao biao bing tong guo liu lan qi de da yin gong neng jin xing da yin , ye ke yi dian ji you jian ran hou ling cun dao ben di hou zai zuo da yin deng xiang guan chu li 。
  fang an er : sheng cheng Excel bao biao hou zhi jie zai ke hu duan jia zai dao liu lan qi , dang ran zai mei you wan quan jia zai shi ying gai ti shi “ zheng zai jia zai , qing deng dai ” deng zi yang 。
  2.3 xi tong pei zhi yu zhu yi shi xiang
  sui ran yi shang dai ma hen jian dan , dan shi ji ying yong bu dang jing chang hui chu xian cuo wu , suo yi xia mian yao jiang dao de xi tong pei zhi he zhu yi shi xiang fei chang guan jian 。
  (1) qian wan yao bao zheng yi shang dai ma shu ru de zheng que xing , fou ze yi dan yun xing cuo wu ,Excel dui xiang hui zhi liu nei cun , nan yi xiao chu , dao zhi xia yi ci tiao yong shi su du kuang man , bing chan sheng nei cun bu ke du xie de Windows cuo wu 。 zhe shi de jie jue fang fa jiu shi zhu xiao dang qian yong hu , ru guo huan bu xing , jiu zhi neng Reset le 。
  (2) yi ding yao she zhi hao fu ze da yin gong neng de asp wen jian de quan xian 。 fang fa shi : zai IIS guan li zhong , xuan ze gai asp wen jian , you jian ran hou xuan “ shu xing ”/“ wen jian an quan xing ”/" ni ming fang wen he yan zheng kong zhi “, zai zhe li IIS mo ren shi ni ming fang wen , ying gai xuan ze yan zheng fang wen ( zhe li ji ben yan zheng he ji cheng Windows yan zheng liang zhong fang shi yun ke , dan qian zhe bu gou an quan ), zhe yi dian wu bi chong yao , fou ze ying yong dang zhong hui chu cuo de 。
  (3) you de shi hou bao biao fen wei duo ye , er qie wo men xi wang mei yi ye you xiang tong de biao tou , yao qiu biao tou mei ye dou zi dong da yin , ke yi zai Excel mo ban zhong jin xing she zhi 。 fang fa ru xia : xuan ze cai dan " wen jian "/" ye mian she zhi "/" gong zuo biao ", ran hou zai " ding duan biao ti xing " shu ru ni biao tou de xing shu ( ru : biao tou wei 1-3 xing ji tian ru :$1:$3)。
  3. zong jie
  yi shang wo men gei chu le yi ge cai yong ASP xie de zai B/S mo shi xia shi xian EXCEL bao biao de sheng cheng yu da yin de li zi , zai shi ji dang zhong yi jing de dao le liang hao de ying yong 。 shi shi ye zheng ming , zhe ge li zi de dai ma sui ran bu nan xie , dan yi ding yao zhu yi xi tong de pei zhi , zhe ye shi wu shu ci shi bai hou de chu de jing yan 。【原文】【汉音对照
 
 
 
 
 
 
 
 
 
日版宠物情人插曲《Winding Road》歌词

日版宠物情人2017的插曲,很带节奏感,日语的,女生唱的。 最后听见是在第8集的时候女主手割伤了,然后男主用嘴帮她吸了一下,插曲就出来了。 歌手:Def...

兄弟共妻,我成了他们夜里的美食

老钟家的两个儿子很特别,就是跟其他的人不太一样,魔一般的执着。兄弟俩都到了要结婚的年龄了,不管自家老爹怎么磨破嘴皮子,兄弟俩说不娶就不娶,老父母为兄弟两操碎了心...

如何磨出破洞牛仔裤?牛仔裤怎么剪破洞?

把牛仔裤磨出有线的破洞 1、具体工具就是磨脚石,下面垫一个硬物,然后用磨脚石一直磨一直磨,到把那块磨薄了,用手撕开就好了。出来的洞啊很自然的。需要猫须的话调几...

我就是扫描下图得到了敬业福和爱国福

先来看下敬业福和爱国福 今年春节,支付宝再次推出了“五福红包”活动,表示要“把欠大家的敬业福都还给大家”。 今天该活动正式启动,和去年一样,需要收集“五福”...

冰箱异味产生的原因和臭味去除的方法

有时候我们打开冰箱就会闻到一股异味,冰箱里的这种异味是因为一些物质发出的气味的混合体,闻起来让人恶心。 产生这些异味的主要原因有以下几点。 1、很多人有这种习...

 
 
1. qian yan bao biao da yin tong chang shi guan li xin xi xi tong zhong de yi ge chong yao mo kuai , er Excel ping jie ta gong neng qiang da 、 ying yong ling huo 、 tong yong xing qiang deng de you shi zai bao biao da yin zhong huo de le guang fan de ying yong 。 zui chu de guan li xin xi xi tong ji ben shang shi cai yong ke hu ji / fu wu qi (C/S) mo shi kai fa de , dan sui zhe WWW de guang fan ying yong , mu qian de guan li xin xi xi tong yi jing zhu jian kai shi cong C/S mo shi xiang liu lan qi / fu wu qi (B/S) mo shi zhuan bian 。B/S mo shi ju you chuan tong C/S mo shi suo bu ji de hen duo te dian , ru geng jia kai fang 、 yu ruan ying jian wu guan 、 ying yong kuo chong he xi tong wei hu sheng ji fang bian deng deng , mu qian yi cheng wei qi ye wang shang shou xuan de ji suan mo shi , yuan xian zai C/S xia de hen duo ruan jian dou kai shi yi zhi dao B/S mo shi xia 。 you yu B/S mo shi de te shu xing , zai C/S xia xiang dui jiao yi shi xian de Excel bao biao da yin gong neng zai B/S xia que cheng wei yi ge nan dian 。 ben wen gen ju zai shi ji de xiang mu zhong zong jie de jing yan , yi ASP wei li , gei chu le yi ge jiao hao de tong yong fang fa 。 2. gong neng shi xian wei le shuo ming wen ti , zhe li ju yi ge li zi 。 xi tong ping tai shi Windows 2000+SQL Server 2000+IIS 5.0+ASP 3, bao biao cai yong de shi Excel, yao qiu an zhao gei ding de bao biao ge shi sheng cheng tu shu xiao shou tong ji de bao biao , bing neng gou da yin 。 2.1 Excel bao biao mo ban de zhi zuo shou xian gen ju gei ding de bao biao ge shi , zhi zuo yi ge Excel mo ban ( jiu shi yao da yin de bao biao de biao ge ), dang ran qi zhong xu yao cong shu ju ku zhong dong tai tong ji sheng cheng de shu ju liu zhe kong bai 。 zhe ge bao biao xian zai Excel zhong hua hao , ran hou bao cun wei mo ban , cun fang zai qi lai , zhe li wei \test\book1.xlt。 2.2 Excel bao biao de sheng cheng yu da yin zhe li cai yong le Excel de Application zu jian , gai zu jian zai an zhuang Excel shi an zhuang dao xi tong zhong 。 wo men de cao zuo ye dou shi zhen dui gai zu jian 。 (1) jian li Excel.Application dui xiang set objExcel=CreateObject("Excel.Application") (2) da kai Excel mo ban objExcel.Workbooks.Open(server.mappath("\test")&"\book1.xlt") ' da kai Excel mo ban objExcel.Sheets(1).select ' xuan zhong gong zuo ye set sheetActive=objExcel.ActiveWorkbook.ActiveSheet (3) Excel de chang gui tian jia cao zuo li ru sheetActive.range("g4").value=date() ‘ zhe li tian jia de shi shi jian , dang ran ye ke yi shi ni zhi ding de ren he shu ju (4) Excel zhong tian jia shu ju ku zhong de ji lu zhe li jia she yi you yi ge shu ju ji adoRset, cun fang you Sql cao zuo sheng cheng de tong ji shu ju 。 num=7 ‘ cong Excel de di qi xing kai shi do until adoRset.EOF ‘ xun huan zhi zhi shu ju ji zhong de shu ju xie wan strRange="d"&num&":f"&num ‘ she ding yao tian xie nei rong de dan yuan qu yu sheetActive.range(strRange).font.size=10 ‘ she ding zi ti da xiao sheetActive.range(strRange).WrapText=false ‘ she ding wen zi hui juan sheetActive.range(strRange).ShrinkToFit=true ‘ she ding shi fou zi dong shi ying biao ge dan yuan da xiao sheetActive.range(strRange).value=array(adoRset("bookid"),adoRset("bookname"),adoRset("author")) ‘ ba shu ju ji zhong de shu ju tian xie dao xiang ying de dan yuan zhong num=num+1 adoRset.MoveNext loop (5) Excel lin shi bao biao wen jian de bao cun ji chu li shi ji yun xing zhong ying gai zhu yi mei ci yi ge yong hu jin xing bao biao da yin shi dou cai yong yi ge lin shi de Excel wen jian , er bu shi ying xing gui ding wen jian ming , yin wei ru guo yong gu ding de wen jian ming de hua , zhi you di yi ci sheng cheng shi cheng gong de , hou mian de cao zuo dou hui yin wei yi cun zai tong ming wen jian er dao zhi shi bai 。 suo yi wo men xu yao mei ci dou chan sheng yi ge lin shi de er qie bu chong fu de wen jian ming , zhe li ke yi cai yong zi ding yi de getTemporaryFile() han shu you lai sheng cheng , ran hou cun fang zai bian liang filename zhong , yong bian liang filepos biao shi zhe xie lin shi wen jian de lu jing 。 ci wai ru guo zhe xie lin shi wen jian bu chu li de hua jiu er jiu zhi hui cheng wei wen jian la ji , yin ci zai mei ge yong hu ti jiao Excel bao biao da yin qing qiu shi yao xian shan chu lin shi mu lu xia suo you yuan xian chan sheng de lin shi da yin wen jian 。 lin shi wen jian de chu li zhu yao dai ma ru xia : function getTemporaryFile(myFileSystem) dim tempFile,dotPos tempFile=myFileSystem.getTempName dotPos=instr(1,tempFile,".") getTemporaryFile=mid(tempFile,1,dotPos)&"xls" end function set myFs=createObject("scripting.FileSystemObject") filePos=server.mappath("\test") & "\tmp\" ' yao cun fang da yin lin shi wen jian de lin shi mu lu fileName=getTemporaryFile(myFs) ' qu de yi ge lin shi wen jian ming myFs.DeleteFile filePos&"*.xls" ' shan chu gai mu lu xia suo you yuan xian chan sheng de lin shi da yin wen jian set myFs=nothing Excel lin shi wen jian de bao cun dai ma wei : objExcel.ActiveWorkbook.saveas filePos&filename (6) tui chu Excel ying yong objExcel.quit set objExcel=Nothing (7) Excel bao biao de da yin qian mian de bu zhou yi jing sheng cheng le Excel bao biao , xia yi bu jin xing da yin , cai yong de ce lue ke yi you liang zhong : fang an yi : ti gong shang mian sheng cheng de Excel bao biao lin shi wen jian lian jie gei yong hu , yong hu ke yi zhi jie dian ji zai liu lan qi zhong da kai Excel bao biao bing tong guo liu lan qi de da yin gong neng jin xing da yin , ye ke yi dian ji you jian ran hou ling cun dao ben di hou zai zuo da yin deng xiang guan chu li 。 fang an er : sheng cheng Excel bao biao hou zhi jie zai ke hu duan jia zai dao liu lan qi , dang ran zai mei you wan quan jia zai shi ying gai ti shi “ zheng zai jia zai , qing deng dai ” deng zi yang 。 2.3 xi tong pei zhi yu zhu yi shi xiang sui ran yi shang dai ma hen jian dan , dan shi ji ying yong bu dang jing chang hui chu xian cuo wu , suo yi xia mian yao jiang dao de xi tong pei zhi he zhu yi shi xiang fei chang guan jian 。 (1) qian wan yao bao zheng yi shang dai ma shu ru de zheng que xing , fou ze yi dan yun xing cuo wu ,Excel dui xiang hui zhi liu nei cun , nan yi xiao chu , dao zhi xia yi ci tiao yong shi su du kuang man , bing chan sheng nei cun bu ke du xie de Windows cuo wu 。 zhe shi de jie jue fang fa jiu shi zhu xiao dang qian yong hu , ru guo huan bu xing , jiu zhi neng Reset le 。 (2) yi ding yao she zhi hao fu ze da yin gong neng de asp wen jian de quan xian 。 fang fa shi : zai IIS guan li zhong , xuan ze gai asp wen jian , you jian ran hou xuan “ shu xing ”/“ wen jian an quan xing ”/" ni ming fang wen he yan zheng kong zhi “, zai zhe li IIS mo ren shi ni ming fang wen , ying gai xuan ze yan zheng fang wen ( zhe li ji ben yan zheng he ji cheng Windows yan zheng liang zhong fang shi yun ke , dan qian zhe bu gou an quan ), zhe yi dian wu bi chong yao , fou ze ying yong dang zhong hui chu cuo de 。 (3) you de shi hou bao biao fen wei duo ye , er qie wo men xi wang mei yi ye you xiang tong de biao tou , yao qiu biao tou mei ye dou zi dong da yin , ke yi zai Excel mo ban zhong jin xing she zhi 。 fang fa ru xia : xuan ze cai dan " wen jian "/" ye mian she zhi "/" gong zuo biao ", ran hou zai " ding duan biao ti xing " shu ru ni biao tou de xing shu ( ru : biao tou wei 1-3 xing ji tian ru :$1:$3)。 3. zong jie yi shang wo men gei chu le yi ge cai yong ASP xie de zai B/S mo shi xia shi xian EXCEL bao biao de sheng cheng yu da yin de li zi , zai shi ji dang zhong yi jing de dao le liang hao de ying yong 。 shi shi ye zheng ming , zhe ge li zi de dai ma sui ran bu nan xie , dan yi ding yao zhu yi xi tong de pei zhi , zhe ye shi wu shu ci shi bai hou de chu de jing yan 。
󰈣󰈤
  免责声明:本文仅代表作者个人观点,与王朝网络无关。王朝网络登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述,其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
华丽的模特拍摄(8)
华丽的模特拍摄(7)
华丽的模特拍摄(6)
华丽的模特拍摄(5)
八里沟
朝阳宫
天下峨眉 云上金顶
老家(四)
 
>>返回首页<<
 
 
 为你推荐
 
 
 
 转载本文
 UBB代码 HTML代码
复制到剪贴板...
 
 热帖排行
 
 
 
 
 
©2005- 王朝网络 版权所有