|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
强大的可扩展性。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安全 |
|