再见西城 发表于 2015-1-16 23:22:17

ASP网站制作之怎样用ASP创建图表

强大的可扩展性。ASP具有强大的扩展性,可以实现与多种网络、硬件设备的连接:通过专用的通讯线路远程接入企业;通过远程拨号服务器为远程拨号客户提供服务;通过WAP为移动电话互联网客户服务。图表如今我们针对EXCEL举别的一个例子,人人都扣问怎样用ASP创建图表的成绩,以下就是办理计划<BR><BR>Firstwesetthetypeofscript<BR>起首设定剧本范例<BR><%@LANGUAGE="VBSCRIPT"%><BR><BR>Maketheobject,andsettheobjecttoanExcelsheet<BR>创建Excelsheet工具<BR><BR>DimMyExcelChart<BR>SetMyExcelChart=CreateObject("Excel.Sheet")<BR><BR>showordontshowexceltouser,TRUEorFALSE<BR>是不是让用户看到EXCEL表格,真或假<BR>MyExcelChart.Application.Visible=True<BR><BR>populatethecells<BR>添EXCEL表格<BR>MyExcelChart.ActiveSheet.Range("B2:k2").Value=Array("Week1","Week2","Week3","Week4","Week5","Week6","Week7","Week8","Week9","Week10")<BR>MyExcelChart.ActiveSheet.Range("B3:k3").Value=Array("67","87","5","9","7","45","45","54","54","10")<BR>MyExcelChart.ActiveSheet.Range("B4:k4").Value=Array("10","10","8","27","33","37","50","54","10","10")<BR>MyExcelChart.ActiveSheet.Range("B5:k5").Value=Array("23","3","86","64","60","18","5","1","36","80")<BR>MyExcelChart.ActiveSheet.Cells(3,1).Value="InternetExplorer"<BR>MyExcelChart.ActiveSheet.Cells(4,1).Value="Netscape"<BR>MyExcelChart.ActiveSheet.Cells(5,1).Value="Other"<BR><BR>Selectthecontentsthatneedtobeinthechart<BR>在EXCEL表当选摘要在图表(CHART)中显现的数据<BR>MyExcelChart.ActiveSheet.Range("b2:k5").Select<BR><BR>Addthechart<BR>加载图表(CHART)<BR>MyExcelChart.Charts.Add<BR>Formatthechart,settypeofchart,shapeofthebars,showtitle,getthedataforthechart,showdatatable,showlegend<BR>初始化图表(CHART),设定图表范例,棒图的外形,要显现的题目,获得要作图的数据,显现数据表,显现图表<BR>MyExcelChart.activechart.ChartType=97<BR>MyExcelChart.activechart.BarShape=3<BR>MyExcelChart.activechart.HasTitle=True<BR>MyExcelChart.activechart.ChartTitle.Text="Visitorslogforeachweekshowninbrowserspercentage"<BR>MyExcelChart.activechart.SetSourceDataMyExcelChart.Sheets("Sheet1").Range("A1:k5"),1<BR>MyExcelChart.activechart.Location1<BR>MyExcelChart.activechart.HasDataTable=True<BR>MyExcelChart.activechart.DataTable.ShowLegendKey=True<BR><BR>Savethetheexcelsheettoexcelface<BR>存进EXCEL表<BR>MyExcelChart.SaveAs"c:chart.xls"<BR>%><BR><BR>NowletscompletetheHTMLtags.<BR>上面是HTML代码<BR><BR><HTML><BR><HEAD><BR><TITLE>MyExcelChart</TITLE><BR></HEAD><BR><BODY><BR></BODY><BR></HTML><BR><BR>ThiscompletesyerASPpage,lookbelowforthecompletecodeofmyexcelchart.asp<BR>上面是源程序myexcelchart.asp的完全代码<BR><BR><%@LANGUAGE="VBSCRIPT"%><BR><%<BR>SetMyExcelChart=CreateObject("Excel.Sheet")<BR><BR>MyExcelChart.Application.Visible=True<BR><BR>MyExcelChart.ActiveSheet.Range("B2:k2").Value=Array("Week1","Week2","Week3","Week4","Week5","Week6","Week7","Week8","Week9","Week10")<BR>MyExcelChart.ActiveSheet.Range("B3:k3").Value=Array("67","87","5","9","7","45","45","54","54","10")<BR>MyExcelChart.ActiveSheet.Range("B4:k4").Value=Array("10","10","8","27","33","37","50","54","10","10")<BR>MyExcelChart.ActiveSheet.Range("B5:k5").Value=Array("23","3","86","64","60","18","5","1","36","80")<BR>MyExcelChart.ActiveSheet.Cells(3,1).Value="InternetExplorer"<BR>MyExcelChart.ActiveSheet.Cells(4,1).Value="Netscape"<BR>MyExcelChart.ActiveSheet.Cells(5,1).Value="Other"<BR><BR>MyExcelChart.ActiveSheet.Range("b2:k5").Select<BR><BR>MyExcelChart.Charts.Add<BR>MyExcelChart.activechart.ChartType=97<BR>MyExcelChart.activechart.BarShape=3<BR>MyExcelChart.activechart.HasTitle=True<BR>MyExcelChart.activechart.ChartTitle.Text="Visitorslogforeachweekshowninbrowserspercentage"<BR>MyExcelChart.activechart.SetSourceDataMyExcelChart.Sheets(&<br><CENTER></CENTER>缺点:正版成本价格贵(盗版就不说了)、不够安全,大多数服务器用windows系统,没有linux安全

小妖女 发表于 2015-1-20 09:43:23

交流是必要的,不管是生活还是学习我们都要试着去交流,通过交流我们可以学到很多我们自己本身所没有的知识,可以分享别人的经验甚至经历。

深爱那片海 发表于 2015-1-29 06:32:52

Session:这个存储跟客户端会话过程的数据,默认20分钟失效

再现理想 发表于 2015-1-31 15:39:48

Response:从字面上讲是“响应”,因此这个是服务端向客户端发送东西的,例如Response.Write

因胸联盟 发表于 2015-2-3 14:08:58

虽然ASP也有很多网络教程。但是这些都不系统。都是半路出家,只是从一个例子告诉你怎么用。不会深入讨论,更不会将没有出现在例子里的方法都一一列举出来。

透明 发表于 2015-2-9 02:55:05

下面简单介绍一下我学习ASP的方法,希望对想学习ASP的朋友有所帮助...

灵魂腐蚀 发表于 2015-2-26 19:32:01

封装性使得代码逻辑清晰,易于管理,并且应用到ASP.Net上就可以使业务逻辑和Html页面分离,这样无论页面原型如何改变,业务逻辑代码都不必做任何改动;继承性和多态性使得代码的可重用性大大提高。

不帅 发表于 2015-3-8 16:47:13

ASP也是这几种脚本语言中最简单易学的开发语言。但ASP也是这几种语言中唯一的一个不能很好支持跨平台的语言。  因为ASP脚本语言非常简单,因此其代码也简单易懂,结合HTML代码,可快速地完成网站的应用程序。

海妖 发表于 2015-3-16 06:24:54

作为IE上广为流传的动态网页开发技术,ASP以它简单易学博得了广大WEB程序爱好这的青睐,而且它对运行环境和开发品台的不挑剔,以及有大量有效的参考手册,极大的推广了它的发展。

小魔女 发表于 2015-3-22 20:52:27

我可以结合自己的经验大致给你说一说,希望对你有所帮助,少走些弯路。
页: [1]
查看完整版本: ASP网站制作之怎样用ASP创建图表