浏览 11306 次
锁定老帖子 主题:JS导出excel表格
该帖已经被评为新手帖
|
|
---|---|
作者 | 正文 |
发表时间:2007-01-09
<%@ page import="com.hisun.mvqq.bean.*"%> <%@ page import="java.util.*"%> <%@ page import="java.math.*"%> <%@ page import="java.lang.*,com.hisun.res.Config"%> <%@include file="/jsp/validate/validate.jsp"%> <jsp:useBean id="userInfo" scope="session" type="com.hisun.mvqq.bean.UserInfo"/> <script language="javascript"> function output() { //拷贝 var elTable = document.getElementById("data_table"); var oRangeRef = document.body.createTextRange(); oRangeRef.moveToElementText( elTable ); oRangeRef.execCommand( "Copy" ); //粘贴 try{ var appExcel = new ActiveXObject( "Excel.Application" ); appExcel.Visible = true; appExcel.Workbooks.Add().Worksheets.Item(1).Paste(); //appExcel = null; }catch(e){ alert("使用此功能必须在浏览器中设置:Internet选项->安全->将本站加入“受信任的站点”。"); } var elTable1 = document.getElementById("sum_table"); var oRangeRef1 = document.body.createTextRange(); oRangeRef1.moveToElementText( elTable1 ); oRangeRef1.execCommand( "Copy" ); //粘贴 try{ appExcel.Visible = true; appExcel.Worksheets.Item(2).Paste(); appExcel1 = null; }catch(e){ alert("使用此功能必须在浏览器中设置:Internet选项->安全->将本站加入“受信任的站点”。"); } } </script> <% String AAADBUser = Config.getProperty("AAADBUSER"); //MaxTime maxtime=new MaxTime(); // String MTime=maxtime.Max_Time("ACA_BUSIDETAIL_LATN_HOUR"); //if(MTime!=null && MTime.length()>8) // MTime=MTime.substring(0,4)+"-"+MTime.substring(4,6)+"-"+MTime.substring(6,8)+" "+MTime.substring(8,10)+"时"; //if(MTime!=null) // MTime=MTime+"时"; %> <% String sp_ID=userInfo.getSpCode(); String sp_name=userInfo.getSpName(); String cStatUserName=userInfo.getUserName(); String querytype=request.getParameter("querytype");//以sp还是以接入号方式查询 String prefixtype=request.getParameter("prefixtype"); //以号段方式还是多个业务方式 String qprefix=request.getParameter("prefix"); //输入一个或多个接入号 String prefixstart=request.getParameter("prefixstart"); //开始接入号 String prefixend=request.getParameter("prefixend"); //结束接入号 String cTable=sp_name; String spID=request.getParameter("sp"); String busType=request.getParameter("busType"); String callType=request.getParameter("callType"); String statType=request.getParameter("statType"); String userType=request.getParameter("userType"); String sYear=request.getParameter("sYear"); String sMonth=request.getParameter("sMonth"); String sDay=request.getParameter("sDay"); String sHour=request.getParameter("sHour") ; String sDate=sYear+"-"+sMonth+"-"+sDay+" "+sHour; //System.out.println(sDate); spStatDate sD=new spStatDate(); //sDate=sD.resDate(sDate); String eYear=request.getParameter("eYear"); String eMonth=request.getParameter("eMonth"); String eDay=request.getParameter("eDay"); String eHour=request.getParameter("eHour"); String eDate=eYear+"-"+eMonth+"-"+eDay+" "+eHour; String durl=""; //eDate=sD.resDate(eDate); // System.out.print(eDate); Vector statData=new Vector(); Vector statClass=new Vector(); try{ spStatMete stat=new spStatMete(); String prefixStr=""; if (prefixtype.equals("0")) prefixStr=qprefix; else prefixStr=prefixstart+","+prefixend; if (querytype.equals("1")){ statData=stat.statMete(querytype,spID,busType,callType,statType,userType,sDate,eDate,userInfo.getLoginNo(),userInfo.getIpAddress()); durl="stYeWuLiang_ShengFen.jsp?querytype="+querytype+"&sp="+spID+"&serid="+busType+"&callType="+callType+"&statType="+statType+"&userType="+userType; durl=durl+"&sYear="+sYear+"&sMonth="+sMonth+"&sDay="+sDay+"&sHour="+sHour; durl=durl+"&eYear="+eYear+"&eMonth="+eMonth+"&eDay="+eDay+"&eHour="+eHour; } else{ statData=stat.statMete(querytype,prefixtype,prefixStr,callType,statType,userType,sDate,eDate,userInfo.getLoginNo(),userInfo.getIpAddress()); durl="stYeWuLiang_ShengFen.jsp?querytype="+querytype+"&sp="+prefixtype+"&serid="+prefixStr+"&callType="+callType+"&statType="+statType+"&userType="+userType; durl=durl+"&sYear="+sYear+"&sMonth="+sMonth+"&sDay="+sDay+"&sHour="+sHour; durl=durl+"&eYear="+eYear+"&eMonth="+eMonth+"&eDay="+eDay+"&eHour="+eHour; } statClass=stat.statMeteClass(spID,busType,callType,statType,userType,sDate,eDate,userInfo.getLoginNo(),userInfo.getIpAddress()); //out.println(busType); if(sp_ID.equals("0001")){ sp_name=stat.sp_Name(spID); } }catch(Exception e){ e.printStackTrace(); } GregorianCalendar createTime = new GregorianCalendar(); %> <html> <head> <title>【电信语音服务平台】</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <link href="../../css/main.css" rel="stylesheet" type="text/css"> </head> <script src="../event.js"></script> <body> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="30" background="/jsp/images/index_16.gif"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="30" align="center"><img src="/jsp/images/index_19.gif" width="32" height="29"></td> <td class="link1">统计分析 业务量情况分析</td> </tr> </table> </td> <td width="9" valign="top" bgcolor="#ffffff"><img src="/jsp/images/index_6.gif" width="9" height="29"></td> </tr> <tr> <td height="6" background="/jsp/images/index_22.gif"></td> <td width="9" background="/jsp/images/index_22.gif" bgcolor="#FFFFFF"></td> </tr> <tr> <td align="center" valign="top" bgcolor="#FFFFFF"> <br> <form name="statForm" method="post" action="" onSubmit="return subm()"> <font size="4"><b><font color="#0000FF"><%=sp_name%>业务量分布情况</font></b></font><br> <table width="96%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="42%">统计分析日期:<font color=red><%=sDate%><%//=sDate.substring(0,4)%><%//=sDate.substring(4,6)%><%//=sDate.substring(6,8)%> <%//=sDate.substring(8,10)%>时</font>至<font color=red><%=eDate%><%//=eDate.substring(0,4)%><%//=eDate.substring(4,6)%><%//=eDate.substring(6,8)%> <%//=eDate.substring(8,10)%>时</font></td> <td width="39%" align="right"></td> <td width="19%" align="right"> <input name="oexcel" type="image" id="oexcel" value="导出excel" src="../../images/b_excel.gif" width="70" height="19" onClick="javascript:output()"> <input name="printw" type="image" id="printw" value="打印" src="../../images/b_dayin.gif" width="45" height="19" onClick="javascript:window.print()"> </td> </tr> </table> <table id="data_table" cellspacing=0 bordercolordark=#ffffff cellpadding=2 width="96%" align=center bgcolor=#dddddd bordercolorlight=#dddddd border=1> <tbody> <tr bgcolor=#f5f5f5> <td align=center width="10%">业务名称</td> <td align="center" width="9%">业务代码</td> <td align=center width="10%">呼叫用户数</td> <td align=center width="10%">呼叫次数</td> <td align=center width="10%">计费时长(分)</td> <td align=center width="10%">平均计费时长(分/次)</td> <td align=center width="10%">信息费(元)</td> <td align=center width="10%">通讯费(元)</td> <td align=center width="10%">计费费用(元)</td> <td align=center width="10%">分解数据到</td> </tr> <% //合计信息 String sername_all="合计"; int user_count_all=0; int record_count_all=0; //float uticket_duration_all=0.00F; float avageTime_all=0.00F; float billing_duration_all=0.00F; float BILL_CHARGE_all=0.00F; float INFO_CHARGE_all=0.00F; float SEC_BILLING_CHARGE_all=0.00F; //System.out.println("durl:"+durl); if(statData.size()>0) for(int i=0;i<statData.size();i++){ //System.out.println("statData.size:"+i); Hashtable hash = (Hashtable)statData.elementAt(i); //out.print((String)hash.get("sql")); String serid=(String)hash.get("serid"); String sername = (String)hash.get("sername"); String prefix1=(String)hash.get("prefix"); String user_count = (String)hash.get("user_count"); String record_count = (String)hash.get("record_count"); //String uticket_duration = (String)hash.get("uticket_duration"); String billing_duration = (String)hash.get("billing_duration"); String avageTime = (String)hash.get("avageTime"); String sp_id=(String)hash.get("sp_id"); String url="stYeWuLiang_ShiJian.jsp?serid="+serid+"&callType="+callType+"&statType="+statType+"&userType="+userType; url=url+"&sYear="+sYear+"&sMonth="+sMonth+"&sDay="+sDay+"&sHour="+sHour; url=url+"&eYear="+eYear+"&eMonth="+eMonth+"&eDay="+eDay+"&eHour="+eHour; //String surl="stYeWuLiang_ShengFen.jsp?sp="+spID+"&serid="+serid+"&callType="+callType+"&statType="+statType+"&userType="+userType; //String url="stYeWuLiang_DiShi.jsp?sp="+spID+"&serid="+serID+"&callType="+callType+"&statType="+statType+"&userType="+userType+"&Province_id="+Province_id; String surl="stYeWuLiang_DiShi.jsp?serid="+serid+"&callType="+callType+"&statType="+statType+"&userType="+userType; surl=surl+"&sYear="+sYear+"&sMonth="+sMonth+"&sDay="+sDay+"&sHour="+sHour; surl=surl+"&eYear="+eYear+"&eMonth="+eMonth+"&eDay="+eDay+"&eHour="+eHour; String BILL_CHARGE = (String)hash.get("BILL_CHARGE"); String INFO_CHARGE=(String)hash.get("INFO_CHARGE"); String SEC_BILLING_CHARGE = (String)hash.get("SEC_BILLING_CHARGE"); user_count_all=user_count_all+Integer.parseInt(user_count); record_count_all=record_count_all+Integer.parseInt(record_count); //uticket_duration_all=uticket_duration_all+Float.parseFloat(uticket_duration); avageTime_all=avageTime_all+Float.parseFloat(avageTime); //System.out.println("avageTime_all:"+avageTime_all); billing_duration_all=billing_duration_all+Float.parseFloat(billing_duration); //System.out.println("billing_duration_all:"+billing_duration_all); BILL_CHARGE_all=BILL_CHARGE_all+Float.parseFloat(BILL_CHARGE); INFO_CHARGE_all=INFO_CHARGE_all+Float.parseFloat(INFO_CHARGE); SEC_BILLING_CHARGE_all=SEC_BILLING_CHARGE_all+Float.parseFloat(SEC_BILLING_CHARGE); %> <tr bgcolor=#ffffff> <td align="center"><%=sername%></td> <td align="center"><%=prefix1%></td> <td align="center"><%=user_count%></td> <td align="center"><%=record_count%></td> <td align="center"><%=billing_duration%></td> <td align="center"><%=avageTime%></td> <td align="center"><%=INFO_CHARGE%></td> <td align="center"><%=SEC_BILLING_CHARGE%></td> <td align="center"><%=BILL_CHARGE%></td> <td align="center"><a href="<%=surl%>">各地市</a> <a href="<%=url%>">每天</a></td> </tr> <% } String BILLING_DURATION_ALL = String.valueOf(String.valueOf(String.valueOf(billing_duration_all))).concat("000"); BILLING_DURATION_ALL = BILLING_DURATION_ALL.substring(0, BILLING_DURATION_ALL.indexOf(".") + 3); String BILL_CHARGE_ALL=String.valueOf(String.valueOf(String.valueOf(BILL_CHARGE_all))).concat("000"); BILL_CHARGE_ALL = BILL_CHARGE_ALL.substring(0, BILL_CHARGE_ALL.indexOf(".") + 3); String AVG_BILL_ALL="0"; if (record_count_all!=0) { AVG_BILL_ALL=String.valueOf(String.valueOf(String.valueOf(billing_duration_all/record_count_all))).concat("000"); AVG_BILL_ALL=AVG_BILL_ALL.substring(0, AVG_BILL_ALL.indexOf(".") + 3); } String INFO_CHARGE_ALL=String.valueOf(String.valueOf(String.valueOf(INFO_CHARGE_all))).concat("000"); INFO_CHARGE_ALL = INFO_CHARGE_ALL.substring(0, INFO_CHARGE_ALL.indexOf(".") + 3); String SEC_BILLING_CHARGE_ALL=String.valueOf(String.valueOf(String.valueOf(SEC_BILLING_CHARGE_all))).concat("000"); SEC_BILLING_CHARGE_ALL = SEC_BILLING_CHARGE_ALL.substring(0, SEC_BILLING_CHARGE_ALL.indexOf(".") + 3); %> <tr bgcolor=#ffffff> <td align="center"><%=sername_all%></td> <td align="center">/</td> <td align="center"><%=user_count_all%></td> <td align="center"><%=record_count_all%></td> <td align="center"><%=BILLING_DURATION_ALL%></td> <td align="center"><%=AVG_BILL_ALL%></td> <td align="center"><%=INFO_CHARGE_ALL%></td> <td align="center"><%=SEC_BILLING_CHARGE_ALL%></td> <td align="center"><%=BILL_CHARGE_ALL%></td> <td align="center"><a href="<%=durl%>">各地市</a></td> </tr> </tbody> </table> <br> <table id="sum_table" cellspacing=0 bordercolordark=#ffffff cellpadding=2 width="96%" align=center bgcolor=#dddddd bordercolorlight=#dddddd border=1> <tbody> <tr bgcolor=#f5f5f5> <td align=center width="12%">总计</td> <td align=center width="11%">呼叫用户数</td> <td align=center width="11%">呼叫次数</td> <td align=center width="11%">计费时长(分)</td> <td align=center width="11%">平均计费时长(分/次)</td> <td align=center width="11%">信息费(元)</td> <td align=center width="11%">通讯费(元)</td> <td align=center width="11%">计费费用(元)</td> </tr> <% //System.out.print("汇总"); if(statClass.size()>0){ for(int i=0;i<statClass.size();i++){ Hashtable hash = (Hashtable)statClass.elementAt(i); String serid = (String)hash.get("sername"); String user_count = (String)hash.get("user_count"); String record_count = (String)hash.get("record_count"); // String uticket_duration = (String)hash.get("uticket_duration"); String billing_duration = (String)hash.get("billing_duration"); String avageTime = (String)hash.get("avageTime"); //System.out.println("jsp avageTime"+avageTime); String BILL_CHARGE = (String)hash.get("BILL_CHARGE"); String INFO_CHARGE=(String)hash.get("INFO_CHARGE"); String SEC_BILLING_CHARGE = (String)hash.get("SEC_BILLING_CHARGE"); %> <tr bgcolor=#ffffff> <td align="center"><font color="#0000FF"><%=serid%></font></td> <td align="center"><font color="#0000FF"><%=user_count%></font></td> <td align="center"><font color="#0000FF"><%=record_count%></font></td> <td align="center"><font color="#0000FF"><%=billing_duration%></font></td> <td align="center"><font color="#0000FF"><%=avageTime%></font></td> <td align="center"><%=INFO_CHARGE%></td> <td align="center"><%=SEC_BILLING_CHARGE%></td> <td align="center"><%=BILL_CHARGE%></td> <td align=center ></td> </tr> <% } }else{ %> <tr bgcolor=#ffffff> <td align="center">0</td> <td align="center">0</td> <td align="center">0</td> <td align="center">0</td> <td align="center">0</td> <td align="center">0</td> <td align="center">0</td> <%--<td align="center">0</td>--%> <td align="center">0</td> </tr> <% } %> </tbody> </table> <br> <table cellspacing=0 bordercolordark=#ffffff cellpadding=2 width="96%" align=center bgcolor=#dddddd bordercolorlight=#dddddd border=1> <tbody> <tr bgcolor=#ffffff> <td align="center"> <table width="10%" border="0" cellspacing="0" cellpadding="0"> <tr> <!--呼叫用户数-------------------------------------------------------------------> <td><applet code="PiechartApplet.class" archive="all.jar" width="250" height="200"> <param name="valuepresym" value=""> <param name="valuepostsym" value=""> <param name="labelcolor" value="50,50,50"> <param name="legendfont" value=""> <param name="legendposition" value="250,20"> <param name="legendtitle" value=""> <param name="LegendBackground" value="255,255,255"> <param name="LegendBorder" value="125,125,125"> <param name="LegendtextColor" value="0,0,0"> <param name="title" value="呼叫用户数|10,30||grey"> <%if(statData.size()>0){ %><param name="Pie1" value="60,80,120,<%=statData.size()%>,10"><% for(int i=0;i<statData.size();i++){ String color[]={"115,152,164","99,99,156","185,53,8","239,214,115","0,63,68","17,97,158","0,128,0","128,128,0","0,0,128","0,128,128","128,0,0" ,"128,0,128","128,128,128","192,192,192","0,255,0","255,0,255","255,0,0","0,0,255","255,255,0","0,255,255","100,0,0","200,0,0","0,100,0","0,200,0","0,0,100","0,0,200","100,100,0","100,0,100","0,100,100","200,200,0","200,0,200" ,"0,200,200","100,100,100","200,200,200","150,150,150","50,50,50","150,0,0","0,0,150","50,50,0","0,50,50"}; Hashtable hash = (Hashtable)statData.elementAt(i); String serid = (String)hash.get("sername"); String user_count = (String)hash.get("user_count"); String labelname="pie1label"+java.lang.String.valueOf(i+1); String segmentname="segment"+java.lang.String.valueOf(i+1); String dataname="data"+java.lang.String.valueOf(i+1)+"series1"; String segmentvalue=color[i%40]+"|||"; %><param name="<%=labelname%>" value=""> <param name="<%=segmentname%>" value="<%=segmentvalue%>"> <param name="<%=dataname%>" value="<%=user_count%>"><% } }else{ %><param name="Pie1" value="60,80,120,1,0"> <param name="pie1label1" value=""> <param name="segment1" value="128,128,128|空||"> <param name="data1series1" value="0"><% }%> </applet></td> <!--呼叫次数---------------------------------------------------------------------> <td><applet code="PiechartApplet.class" archive="all.jar" width="250" height="200"> <param name="valuepresym" value=""> <param name="valuepostsym" value=""> <param name="labelcolor" value="50,50,50"> <param name="legendfont" value=""> <param name="legendposition" value="250,20"> <param name="legendtitle" value=""> <param name="LegendBackground" value="255,255,255"> <param name="LegendBorder" value="125,125,125"> <param name="LegendtextColor" value="0,0,0"> <param name="title" value="呼叫次数|10,30||grey"> <%if(statData.size()>0){ %><param name="Pie1" value="60,80,120,<%=statData.size()%>,10"><% for(int i=0;i<statData.size();i++){ String color[]={"115,152,164","99,99,156","185,53,8","239,214,115","0,63,68","17,97,158","0,128,0","128,128,0","0,0,128","0,128,128","128,0,0" ,"128,0,128","128,128,128","192,192,192","0,255,0","255,0,255","255,0,0","0,0,255","255,255,0","0,255,255","100,0,0","200,0,0","0,100,0","0,200,0","0,0,100","0,0,200","100,100,0","100,0,100","0,100,100","200,200,0","200,0,200" ,"0,200,200","100,100,100","200,200,200","150,150,150","50,50,50","150,0,0","0,0,150","50,50,0","0,50,50"}; Hashtable hash = (Hashtable)statData.elementAt(i); String serid = (String)hash.get("sername"); String record_count = (String)hash.get("record_count"); String labelname="pie1label"+java.lang.String.valueOf(i+1); String segmentname="segment"+java.lang.String.valueOf(i+1); String dataname="data"+java.lang.String.valueOf(i+1)+"series1"; String segmentvalue=color[i%40]+"|||"; %><param name="<%=labelname%>" value=""> <param name="<%=segmentname%>" value="<%=segmentvalue%>"> <param name="<%=dataname%>" value="<%=record_count%>"><% } }else{ %><param name="Pie1" value="60,80,120,1,0"> <param name="pie1label1" value=""> <param name="segment1" value="128,128,128|空||"> <param name="data1series1" value="0"><% }%> </applet></td> <!--标题------------------------------------------------------------------------> <td rowspan="2"><applet code="PiechartApplet.class" archive="all.jar" width="180" height="400"> <param name="valuepresym" value=""> <param name="valuepostsym" value=" "> <param name="labelcolor" value="50,50,50"> <param name="legendfont" value=""> <param name="legendposition" value="20,80"> <param name="legendtitle" value="业务名称"> <param name="LegendBackground" value="255,255,255"> <param name="LegendBorder" value="125,125,125"> <param name="LegendtextColor" value="0,0,0"> <param name="title" value="标题|400,400||grey"> <%if(statData.size()>0){ %><param name="Pie1" value="400,400,120,<%=statData.size()%>,10"><% for(int i=0;i<statData.size();i++){ String color[]={"115,152,164","99,99,156","185,53,8","239,214,115","0,63,68","17,97,158","0,128,0","128,128,0","0,0,128","0,128,128","128,0,0" ,"128,0,128","128,128,128","192,192,192","0,255,0","255,0,255","255,0,0","0,0,255","255,255,0","0,255,255","100,0,0","200,0,0","0,100,0","0,200,0","0,0,100","0,0,200","100,100,0","100,0,100","0,100,100","200,200,0","200,0,200" ,"0,200,200","100,100,100","200,200,200","150,150,150","50,50,50","150,0,0","0,0,150","50,50,0","0,50,50"}; Hashtable hash = (Hashtable)statData.elementAt(i); String serid = (String)hash.get("sername"); String labelname="pie1label"+java.lang.String.valueOf(i+1); String segmentname="segment"+java.lang.String.valueOf(i+1); String dataname="data"+java.lang.String.valueOf(i+1)+"series1"; String segmentvalue=color[i%40]+"|"+serid+"||"; %><param name="<%=labelname%>" value="<%=serid%>"> <param name="<%=segmentname%>" value="<%=segmentvalue%>"> <param name="<%=dataname%>" value="0"><% } }else{ %><param name="Pie1" value="60,80,120,1,0"> <param name="pie1label1" value=""> <param name="segment1" value="128,128,128|空||"> <param name="data1series1" value="0"><% }%> </applet></td> </tr> <tr> <!--计费时长---------------------------------------------------------------------> <td><applet code="PiechartApplet.class" archive="all.jar" width="250" height="200"> <param name="valuepresym" value=""> <param name="valuepostsym" value=""> <param name="labelcolor" value="50,50,50"> <param name="legendfont" value=""> <param name="legendposition" value="250,20"> <param name="legendtitle" value="业务类型"> <param name="LegendBackground" value="255,255,255"> <param name="LegendBorder" value="125,125,125"> <param name="LegendtextColor" value="0,0,0"> <param name="title" value="计费时长|10,30||grey"> <%if(statData.size()>0){ %><param name="Pie1" value="60,80,120,<%=statData.size()%>,10"><% for(int i=0;i<statData.size();i++){ String color[]={"115,152,164","99,99,156","185,53,8","239,214,115","0,63,68","17,97,158","0,128,0","128,128,0","0,0,128","0,128,128","128,0,0" ,"128,0,128","128,128,128","192,192,192","0,255,0","255,0,255","255,0,0","0,0,255","255,255,0","0,255,255","100,0,0","200,0,0","0,100,0","0,200,0","0,0,100","0,0,200","100,100,0","100,0,100","0,100,100","200,200,0","200,0,200" ,"0,200,200","100,100,100","200,200,200","150,150,150","50,50,50","150,0,0","0,0,150","50,50,0","0,50,50"}; Hashtable hash = (Hashtable)statData.elementAt(i); String serid = (String)hash.get("sername"); String billing_duration= (String)hash.get("billing_duration"); String labelname="pie1label"+java.lang.String.valueOf(i+1); String segmentname="segment"+java.lang.String.valueOf(i+1); String dataname="data"+java.lang.String.valueOf(i+1)+"series1"; String segmentvalue=color[i%40]+"|||"; %><param name="<%=labelname%>" value=""> <param name="<%=segmentname%>" value="<%=segmentvalue%>"> <param name="<%=dataname%>" value="<%=billing_duration%>"><% } }else{ %><param name="Pie1" value="60,80,120,1,0"> <param name="pie1label1" value=""> <param name="segment1" value="128,128,128|空||"> <param name="data1series1" value="0"><% }%> </applet></td> <!--信息费-----------------------------------------------------------------> <td><applet code="PiechartApplet.class" archive="all.jar" width="250" height="200"> <param name="valuepresym" value=""> <param name="valuepostsym" value=""> <param name="labelcolor" value="50,50,50"> <param name="legendfont" value=""> <param name="legendposition" value="250,20"> <param name="legendtitle" value="业务类型"> <param name="LegendBackground" value="255,255,255"> <param name="LegendBorder" value="125,125,125"> <param name="LegendtextColor" value="0,0,0"> <param name="title" value="信息费|10,30||grey"> <%if(statData.size()>0){ %><param name="Pie1" value="60,80,120,<%=statData.size()%>,10"><% for(int i=0;i<statData.size();i++){ String color[]={"115,152,164","99,99,156","185,53,8","239,214,115","0,63,68","17,97,158","0,128,0","128,128,0","0,0,128","0,128,128","128,0,0" ,"128,0,128","128,128,128","192,192,192","0,255,0","255,0,255","255,0,0","0,0,255","255,255,0","0,255,255","100,0,0","200,0,0","0,100,0","0,200,0","0,0,100","0,0,200","100,100,0","100,0,100","0,100,100","200,200,0","200,0,200" ,"0,200,200","100,100,100","200,200,200","150,150,150","50,50,50","150,0,0","0,0,150","50,50,0","0,50,50"}; Hashtable hash = (Hashtable)statData.elementAt(i); String BILL_CHARGE = (String)hash.get("BILL_CHARGE"); //String record_count = (String)hash.get("record_count"); //String uticket_duration = (String)hash.get("uticket_duration"); //String avageTime = (String)hash.get("avageTime"); String labelname="pie1label"+java.lang.String.valueOf(i+1); String segmentname="segment"+java.lang.String.valueOf(i+1); String dataname="data"+java.lang.String.valueOf(i+1)+"series1"; String segmentvalue=color[i%40]+"|||"; %><param name="<%=labelname%>" value=""> <param name="<%=segmentname%>" value="<%=segmentvalue%>"> <param name="<%=dataname%>" value="<%=BILL_CHARGE%>"><% } }else{ %><param name="Pie1" value="60,80,120,1,0"> <param name="pie1label1" value=""> <param name="segment1" value="128,128,128|空||"> <param name="data1series1" value="0"><% }%> </applet></td> </tr> </table> </td> </tr> </tbody> </table> <br> <table width="90%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="70%">制表时间: <%=sD.nowDate()%> </td> <td align="right" width="30%">制表人:<%=cStatUserName%> <font color=red><<%=cTable%>></font></td> </tr> </table> <br><table width="90%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="70%"> </td> <td align="right" width="30%"> </td> </tr> </table> </form> </td> <td width="9" bgcolor="#ffffff"></td> </tr> <tr> <td height="8" align="left" background="/jsp/images/index_11-bg.gif" bgcolor="#FFFFFF"><img src="/jsp/images/index_11.gif" width="15" height="15"></td> <td width="9" height="8" bgcolor="#FFFFFF"><img src="/jsp/images/index_11-2.gif" width="9" height="15"></td> </tr> </table> </body> </html> <script language="JavaScript" type="text/javascript"> function subm() { return false; } </script> 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |
发表时间:2007-01-09
我汗,楼主可以用 []把它们框起来么。。。FF差点挂掉了。
|
|
返回顶楼 | |
发表时间:2007-01-09
boin 写道 我汗,楼主可以用 []把它们框起来么。。。FF差点挂掉了。 恶意代码,FF挂掉了。
|
|
返回顶楼 | |
发表时间:2007-01-10
怎么什么都没有?
|
|
返回顶楼 | |
发表时间:2007-01-10
我不觉得这个贴有什么技术在其中。JS访问Excel或者JAVA访问Excel都已经是成型的技术了。不知作者是否另有其意。而且这个JSP让我看了很伤心。真的。
|
|
返回顶楼 | |
发表时间:2007-01-11
写的有点莫名奇妙,很奇怪,就是想发表,请先整理一下再说吧
|
|
返回顶楼 | |
发表时间:2007-01-12
j2eeqk 写道 而且这个JSP让我看了很伤心。
确实很让人伤心,都什么年代了,还会出现这么长的JSP。 另外提一句,完全没有必要这么麻烦。既然可以创建activex来处理excel,则完全可以将表格选中,然后发送复制命令,再发送粘贴命令给excel,再保存,就可以了。前提是必须在windows下使用IE,并把安全级别降低。 另外,不可预知的干扰因素太多。 |
|
返回顶楼 | |