如何利用润乾输出结果到Excel文件中
展开全部
action=0"></iframe> <form action="${ctx}/reportJsp/saveAsExcel.jsp" method="post" name="saveAsExcelForm" id="saveAsExcelForm" target="report1_saveAs_frame"> <input type="hidden" name="raq" value="/queryparams.raq"> <input type="hidden" name="param" value="${nativeParam}"> </form> </div>2. [代码][JavaScript]代码 function saveAsExcelSubmit(){ $('#saveAsExcelForm').submit(); } var report_cachedId; //润乾缓存报表临时ID; var reportParamsId; //润乾报表对应参数ID; function saveAsExcel(){ var url = '${ctx}reportServlet?action=3&file=%2Fqueryparams.raq&columns=0&srcType=file&width=-1&height=0&reportParamsId='+reportParamsId+'&cachedId='+report_cachedId+'&t_i_m_e=' + (+new Date) + '&excelFormat=2003&pageStyle=0&formula=0'; document.report1_saveAs_frame.location = url; }3. [代码][JavaScript]代码 //这段代码放在saveAsExcel.jsp文件JS里最后执行; window.parent.reportParamsId = document.report1_turnPageForm.elements['reportParamsId'].value; window.parent.report_cachedId = document.report1_turnPageForm.elements['report1_cachedId'].value; window.parent.saveAsExcel();
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询