/* HD ¾÷¹«ÇöȲ (SMMND02000.xrw - JScript ) - Version : 1) : Ver.1.00.01 */ //**Àü¿ªº¯¼ö**// /** * @group : * @ver : 2007.07.11 * @by : ±èÁø¾Æ * @--------------------------------------------------- * @type : function * @access : public * @desc : È­¸é ÃʱâÈ­ * @param : * @return : * @--------------------------------------------------- */ function fDone(){ var currentDate = getCurrentDate(); // ÇöÀçÀÏÀÚ var sCurrentDate = new Date(); model.setValue("/root/main/condition/srchtodd" , currentDate); // ÇöÀçÀÏÀÚ model.setValue("/root/main/condition/srchfromdd", (sCurrentDate.getAddDate(-1, "M")).getDateFormat()); // ÇÑ ´Þ ÀÌÀü ÀÏÀÚ model.refresh(); fSrchBizPresCond(); // ¾÷¹«ÇöȲ Á¶È¸ } /** * @group : * @ver : 2007.08.13 * @by : ±èÁø¾Æ * @--------------------------------------------------- * @type : function * @access : public * @desc : ¾÷¹«ÇöȲ Á¶È¸ * @param : * @return : * @--------------------------------------------------- */ function fSrchBizPresCond(){ var TmpPath = "/root/tmp/tmpbizprescondlist/tmpbizprescondinfo"; // (Tmp) var bizPresCondPath = "/root/main/bizprescondstatslist/bizprescondstatsinfo"; // ¾÷¹«ÇöȲÅë°è var patPresCondHDPath = "/root/main/patprescondstatslist/patprescondstatsinfo[1]"; // ȯÀÚÇöȲÅë°è (HD) var patPresCondPDPath = "/root/main/patprescondstatslist/patprescondstatsinfo[2]"; // ȯÀÚÇöȲÅë°è (PD) var patPresCondSumPath = "/root/main/patprescondstatslist/patprescondstatsinfo[3]"; // ȯÀÚÇöȲÅë°è (Total) var HDStatsPath = "/root/main/hdstatslist/hdstatsinfo"; // Ç÷¾×Åõ¼® ÇöȲÅë°è var PDStatsPath = "/root/main/pdstatslist/pdstatsinfo"; // º¹¸·Åõ¼® ÇöȲÅë°è var PDBizStatsPath = "/root/main/pdbizstatslist/pdbizstatsinfo"; // º¹¸·Åõ¼®¾÷¹« ÇöȲÅë°è model.removenode ("/root/send"); model.makeNode ("/root/send"); model.makeValue ("/root/send/reqdata/srchfromdd", model.getValue("/root/main/condition/srchfromdd")); model.makeValue ("/root/send/reqdata/srchtodd" , model.getValue("/root/main/condition/srchtodd") ); model.removeNodeset("/root/tmp/tmpbizprescondlist"); submit("TRMND02001"); //** Á¶È¸µÈ °ª ¼³Á¤ **// //* ¾÷¹« ÇöȲÅë°è *// // ÀÔ¿ø model.setValue(bizPresCondPath + "[1]/hdbizprescnt" , model.getValue(TmpPath + "/hdinbizprescnt")); model.setValue(bizPresCondPath + "[1]/pdbizprescnt" , model.getValue(TmpPath + "/pdinbizprescnt")); model.setValue(bizPresCondPath + "[1]/hpbizprescnt" , model.getValue(TmpPath + "/hpinbizprescnt")); model.setValue(bizPresCondPath + "[1]/hdfbizprescnt" , model.getValue(TmpPath + "/hdfinbizprescnt")); //2011.07.28 by kya SLED Ç׸ñÃß°¡ model.setValue(bizPresCondPath + "[1]/sledbizprescnt" , model.getValue(TmpPath + "/sledinbizprescnt")); //2012.02.13 by kya CRRT Ç׸ñÃß°¡ model.setValue(bizPresCondPath + "[1]/crrtbizprescnt" , model.getValue(TmpPath + "/crrtinbizprescnt")); model.setValue(bizPresCondPath + "[1]/totalbizprescnt", model.getValue(TmpPath + "/totalinbizprescnt")); // ÁßȯÀÚ½Ç model.setValue(bizPresCondPath + "[2]/hdbizprescnt" , model.getValue(TmpPath + "/hdicubizprescnt")); model.setValue(bizPresCondPath + "[2]/pdbizprescnt" , model.getValue(TmpPath + "/pdicubizprescnt")); model.setValue(bizPresCondPath + "[2]/hpbizprescnt" , model.getValue(TmpPath + "/hpicubizprescnt")); model.setValue(bizPresCondPath + "[2]/hdfbizprescnt" , model.getValue(TmpPath + "/hdficubizprescnt")); //2011.07.28 by kya SLED Ç׸ñÃß°¡ model.setValue(bizPresCondPath + "[2]/sledbizprescnt" , model.getValue(TmpPath + "/sledicubizprescnt")); //2012.02.13 by kya CRRT Ç׸ñÃß°¡ model.setValue(bizPresCondPath + "[2]/crrtbizprescnt" , model.getValue(TmpPath + "/crrticubizprescnt")); model.setValue(bizPresCondPath + "[2]/totalbizprescnt", model.getValue(TmpPath + "/totalicubizprescnt")); // ¿Ü·¡ model.setValue(bizPresCondPath + "[3]/hdbizprescnt" , model.getValue(TmpPath + "/hdoutbizprescnt")); model.setValue(bizPresCondPath + "[3]/pdbizprescnt" , model.getValue(TmpPath + "/pdoutbizprescnt")); model.setValue(bizPresCondPath + "[3]/hpbizprescnt" , model.getValue(TmpPath + "/hpoutbizprescnt")); model.setValue(bizPresCondPath + "[3]/hdfbizprescnt" , model.getValue(TmpPath + "/hdfoutbizprescnt")); //2011.07.28 by kya SLED Ç׸ñÃß°¡ model.setValue(bizPresCondPath + "[3]/sledbizprescnt" , model.getValue(TmpPath + "/sledoutbizprescnt")); //2012.02.13 by kya CRRT Ç׸ñÃß°¡ model.setValue(bizPresCondPath + "[3]/crrtbizprescnt" , model.getValue(TmpPath + "/crrtoutbizprescnt")); model.setValue(bizPresCondPath + "[3]/totalbizprescnt", model.getValue(TmpPath + "/totaloutbizprescnt")); // ÀÀ±Þ½Ç model.setValue(bizPresCondPath + "[4]/hdbizprescnt" , model.getValue(TmpPath + "/hderbizprescnt")); model.setValue(bizPresCondPath + "[4]/pdbizprescnt" , model.getValue(TmpPath + "/pderbizprescnt")); model.setValue(bizPresCondPath + "[4]/hpbizprescnt" , model.getValue(TmpPath + "/hperbizprescnt")); model.setValue(bizPresCondPath + "[4]/hdfbizprescnt" , model.getValue(TmpPath + "/hdferbizprescnt")); //2011.07.28 by kya SLED Ç׸ñÃß°¡ model.setValue(bizPresCondPath + "[4]/sledbizprescnt" , model.getValue(TmpPath + "/slederbizprescnt")); //2012.02.13 by kya CRRT Ç׸ñÃß°¡ model.setValue(bizPresCondPath + "[4]/crrtbizprescnt" , model.getValue(TmpPath + "/crrterbizprescnt")); model.setValue(bizPresCondPath + "[4]/totalbizprescnt", model.getValue(TmpPath + "/totalerbizprescnt")); // Total model.setValue(bizPresCondPath + "[5]/hdbizprescnt" , parseInt(model.getValue(TmpPath + "/hdinbizprescnt" )) + parseInt(model.getValue(TmpPath + "/hdicubizprescnt")) + parseInt(model.getValue(TmpPath + "/hdoutbizprescnt")) + parseInt(model.getValue(TmpPath + "/hderbizprescnt" ))); model.setValue(bizPresCondPath + "[5]/pdbizprescnt" , parseInt(model.getValue(TmpPath + "/pdinbizprescnt" )) + parseInt(model.getValue(TmpPath + "/pdicubizprescnt")) + parseInt(model.getValue(TmpPath + "/pdoutbizprescnt")) + parseInt(model.getValue(TmpPath + "/pderbizprescnt" ))); model.setValue(bizPresCondPath + "[5]/hpbizprescnt" , parseInt(model.getValue(TmpPath + "/hpinbizprescnt" )) + parseInt(model.getValue(TmpPath + "/hpicubizprescnt")) + parseInt(model.getValue(TmpPath + "/hpoutbizprescnt")) + parseInt(model.getValue(TmpPath + "/hperbizprescnt" ))); model.setValue(bizPresCondPath + "[5]/hdfbizprescnt" , parseInt(model.getValue(TmpPath + "/hdfinbizprescnt" )) + parseInt(model.getValue(TmpPath + "/hdficubizprescnt")) + parseInt(model.getValue(TmpPath + "/hdfoutbizprescnt")) + parseInt(model.getValue(TmpPath + "/hdferbizprescnt" ))); //Ãß°¡ 2011.07.28 by kya model.setValue(bizPresCondPath + "[5]/sledbizprescnt" , parseInt(model.getValue(TmpPath + "/sledinbizprescnt" )) + parseInt(model.getValue(TmpPath + "/sledicubizprescnt")) + parseInt(model.getValue(TmpPath + "/sledoutbizprescnt")) + parseInt(model.getValue(TmpPath + "/slederbizprescnt" ))); //Ãß°¡ 2012.02.13 by kya model.setValue(bizPresCondPath + "[5]/crrtbizprescnt" , parseInt(model.getValue(TmpPath + "/crrtinbizprescnt" )) + parseInt(model.getValue(TmpPath + "/crrticubizprescnt")) + parseInt(model.getValue(TmpPath + "/crrtoutbizprescnt")) + parseInt(model.getValue(TmpPath + "/crrterbizprescnt" ))); model.setValue(bizPresCondPath + "[5]/totalbizprescnt", parseInt(model.getValue(TmpPath + "/totalinbizprescnt" )) + parseInt(model.getValue(TmpPath + "/totalicubizprescnt")) + parseInt(model.getValue(TmpPath + "/totaloutbizprescnt")) + parseInt(model.getValue(TmpPath + "/totalerbizprescnt" ))); //* ȯÀÚÇöȲÅë°è *// // ½Åȯ ¼ö model.setValue(patPresCondHDPath + "/fnexamcnt", model.getValue(TmpPath + "/hdfnexamcnt")); model.setValue(patPresCondPDPath + "/fnexamcnt", model.getValue(TmpPath + "/pdfnexamcnt")); model.setValue(patPresCondSumPath + "/fnexamcnt", model.getValue(TmpPath + "/totalfnexamcnt")); // »ó´ã°Ç¼ö model.setValue(patPresCondHDPath + "/cnstcnt", model.getValue(TmpPath + "/hdcnstcnt")); model.setValue(patPresCondPDPath + "/cnstcnt", model.getValue(TmpPath + "/pdcnstcnt")); model.setValue(patPresCondSumPath + "/cnstcnt", model.getValue(TmpPath + "/totalcnstcnt")); // 󹿱³À°°Ç¼ö model.setValue(patPresCondHDPath + "/prcpeduccnt", model.getValue(TmpPath + "/hdprcpeduccnt")); model.setValue(patPresCondPDPath + "/prcpeduccnt", model.getValue(TmpPath + "/pdprcpeduccnt")); model.setValue(patPresCondSumPath + "/prcpeduccnt", model.getValue(TmpPath + "/totalprcpeduccnt")); // ±â·Ï±³À°°Ç¼ö model.setValue(patPresCondHDPath + "/receduccnt", model.getValue(TmpPath + "/hdreceduccnt")); model.setValue(patPresCondPDPath + "/receduccnt", model.getValue(TmpPath + "/pdreceduccnt")); model.setValue(patPresCondSumPath + "/receduccnt", model.getValue(TmpPath + "/totalreceduccnt")); // ¿øÀκ° ARF°Ç¼ö model.setValue(patPresCondHDPath + "/causecnt1", model.getValue(TmpPath + "/hdcausecnt1")); model.setValue(patPresCondPDPath + "/causecnt1", model.getValue(TmpPath + "/pdcausecnt1")); model.setValue(patPresCondSumPath + "/causecnt1", model.getValue(TmpPath + "/totalcausecnt1")); // ¿øÀκ° CRF°Ç¼ö model.setValue(patPresCondHDPath + "/causecnt2", model.getValue(TmpPath + "/hdcausecnt2")); model.setValue(patPresCondPDPath + "/causecnt2", model.getValue(TmpPath + "/pdcausecnt2")); model.setValue(patPresCondSumPath + "/causecnt2", model.getValue(TmpPath + "/totalcausecnt2")); // º¸Çè model.setValue(patPresCondHDPath + "/healinsucnt", model.getValue(TmpPath + "/hdhealinsucnt")); model.setValue(patPresCondPDPath + "/healinsucnt", model.getValue(TmpPath + "/pdhealinsucnt")); model.setValue(patPresCondSumPath + "/healinsucnt", model.getValue(TmpPath + "/totalhealinsucnt")); // º¸È£ 1Á¾ model.setValue(patPresCondHDPath + "/proc1kindinsucnt", model.getValue(TmpPath + "/hdproc1kindinsucnt")); model.setValue(patPresCondPDPath + "/proc1kindinsucnt", model.getValue(TmpPath + "/pdproc1kindinsucnt")); model.setValue(patPresCondSumPath + "/proc1kindinsucnt", model.getValue(TmpPath + "/totalproc1kindinsucnt")); // º¸È£ 2Á¾ model.setValue(patPresCondHDPath + "/proc2kindinsucnt", model.getValue(TmpPath + "/hdproc2kindinsucnt")); model.setValue(patPresCondPDPath + "/proc2kindinsucnt", model.getValue(TmpPath + "/pdproc2kindinsucnt")); model.setValue(patPresCondSumPath + "/proc2kindinsucnt", model.getValue(TmpPath + "/totalproc2kindinsucnt")); // »êÀç model.setValue(patPresCondHDPath + "/inducsinsucnt", model.getValue(TmpPath + "/hdinducsinsucnt")); model.setValue(patPresCondPDPath + "/inducsinsucnt", model.getValue(TmpPath + "/pdinducsinsucnt")); model.setValue(patPresCondSumPath + "/inducsinsucnt", model.getValue(TmpPath + "/totalinducsinsucnt")); // ±âŸ model.setValue(patPresCondHDPath + "/etcinsucnt", model.getValue(TmpPath + "/hdetcinsucnt")); model.setValue(patPresCondPDPath + "/etcinsucnt", model.getValue(TmpPath + "/pdetcinsucnt")); model.setValue(patPresCondSumPath + "/etcinsucnt", model.getValue(TmpPath + "/totaletcinsucnt")); // Àü¿ø model.setValue(patPresCondHDPath + "/chnghospcnt", model.getValue(TmpPath + "/hdchnghospcnt")); model.setValue(patPresCondPDPath + "/chnghospcnt", model.getValue(TmpPath + "/pdchnghospcnt")); model.setValue(patPresCondSumPath + "/chnghospcnt", model.getValue(TmpPath + "/totalchnghospcnt")); // »ç¸Á model.setValue(patPresCondHDPath + "/dethcnt", model.getValue(TmpPath + "/hddethcnt")); model.setValue(patPresCondPDPath + "/dethcnt", model.getValue(TmpPath + "/pddethcnt")); model.setValue(patPresCondSumPath + "/dethcnt", model.getValue(TmpPath + "/totaldethcnt")); // ½ÅÀåÀÌ½Ä model.setValue(patPresCondHDPath + "/bdhttrnptcnt", model.getValue(TmpPath + "/hdbdhttrnptcnt")); model.setValue(patPresCondPDPath + "/bdhttrnptcnt", model.getValue(TmpPath + "/pdbdhttrnptcnt")); model.setValue(patPresCondSumPath + "/bdhttrnptcnt", model.getValue(TmpPath + "/totalbdhttrnptcnt")); // Àüȯ model.setValue(patPresCondHDPath + "/cvrtcnt", model.getValue(TmpPath + "/hdcvrtcnt")); model.setValue(patPresCondPDPath + "/cvrtcnt", model.getValue(TmpPath + "/pdcvrtcnt")); model.setValue(patPresCondSumPath + "/cvrtcnt", model.getValue(TmpPath + "/totalcvrtcnt")); //* Á¾·ùº° ÇöȲÅë°è *// // Ç÷¾×Åõ¼® model.setValue(HDStatsPath + "[1]/patcnt", model.getValue(TmpPath + "/hdavfcount" )); model.setValue(HDStatsPath + "[2]/patcnt", model.getValue(TmpPath + "/hdavgcount" )); model.setValue(HDStatsPath + "[3]/patcnt", model.getValue(TmpPath + "/hdpermccount" )); model.setValue(HDStatsPath + "[4]/patcnt", model.getValue(TmpPath + "/hdjvccount" )); model.setValue(HDStatsPath + "[5]/patcnt", model.getValue(TmpPath + "/hdfvccount" )); model.setValue(HDStatsPath + "[6]/patcnt", model.getValue(TmpPath + "/hdsvccount" )); model.setValue(HDStatsPath + "[7]/patcnt", model.getValue(TmpPath + "/hdetccount" )); model.setValue(HDStatsPath + "[8]/patcnt", parseInt(model.getValue(TmpPath + "/hdavfcount" )) + parseInt(model.getValue(TmpPath + "/hdavgcount" )) + parseInt(model.getValue(TmpPath + "/hdpermccount")) + parseInt(model.getValue(TmpPath + "/hdjvccount" )) + parseInt(model.getValue(TmpPath + "/hdfvccount" )) + parseInt(model.getValue(TmpPath + "/hdsvccount" )) + parseInt(model.getValue(TmpPath + "/hdetccount" ))); // º¹¸·Åõ¼® model.setValue(PDStatsPath + "[1]/patcnt", model.getValue(TmpPath + "/pdcapdcount" )); model.setValue(PDStatsPath + "[2]/patcnt", model.getValue(TmpPath + "/pdapdcount" )); model.setValue(PDStatsPath + "[3]/patcnt", model.getValue(TmpPath + "/pdipdcount" )); model.setValue(PDStatsPath + "[4]/patcnt", model.getValue(TmpPath + "/pdnpdcount" )); model.setValue(PDStatsPath + "[5]/patcnt", model.getValue(TmpPath + "/pdccpdcount" )); model.setValue(PDStatsPath + "[6]/patcnt", parseInt(model.getValue(TmpPath + "/pdcapdcount")) + parseInt(model.getValue(TmpPath + "/pdapdcount ")) + parseInt(model.getValue(TmpPath + "/pdipdcount ")) + parseInt(model.getValue(TmpPath + "/pdnpdcount ")) + parseInt(model.getValue(TmpPath + "/pdccpdcount"))); // º¹¸·Åõ¼®¾÷¹« model.setValue(PDBizStatsPath + "[1]/cnt", model.getValue(TmpPath + "/catefixcount" )); model.setValue(PDBizStatsPath + "[2]/cnt", model.getValue(TmpPath + "/dinfcount" )); model.setValue(PDBizStatsPath + "[3]/cnt", model.getValue(TmpPath + "/pipecount" )); model.setValue(PDBizStatsPath + "[4]/cnt", model.getValue(TmpPath + "/edemacnfmcount" )); model.setValue(PDBizStatsPath + "[5]/cnt", model.getValue(TmpPath + "/tsetexchcount" )); model.setValue(PDBizStatsPath + "[6]/cnt", model.getValue(TmpPath + "/dialblodcount" )); model.setValue(PDBizStatsPath + "[7]/cnt", parseInt(model.getValue(TmpPath + "/catefixcount" )) + parseInt(model.getValue(TmpPath + "/dinfcount" )) + parseInt(model.getValue(TmpPath + "/pipecount" )) + parseInt(model.getValue(TmpPath + "/edemacnfmcount")) + parseInt(model.getValue(TmpPath + "/tsetexchcount" )) + parseInt(model.getValue(TmpPath + "/dialblodcount" ))); } /************************************************************************************************************************/ /** * @group : * @ver : * @by : ±è±â¿ë * @--------------------------------------------------- * @type : function * @access : public * @desc : ±×¸®µå º° ¿¢¼¿ÀúÀå * @param : * @return : * @--------------------------------------------------- */ function saveExcelAll() { var paramLen = saveExcelAll.arguments.length; // ¸¶Áö¸· ÀÎÀÚ°¡ BooleanÀÏ °æ¿ì ó¸® var extendsCaptionBool; if( typeof(saveExcelAll.arguments[paramLen - 1]) == "boolean" ) { extendsCaptionBool = saveExcelAll.arguments[paramLen - 1]; paramLen = paramLen - 1; } else{ extendsCaptionBool = false; } var tmpParamArray = new Array(); if( extendsCaptionBool ) { for( var i = 0; i < paramLen; i++ ) { tmpParamArray[i] = saveExcelAll.arguments[i]; } saveExcelAllWithCaption(tmpParamArray); } else{ for( var i = 0; i < paramLen; i++ ) { tmpParamArray[i] = saveExcelAll.arguments[i]; } saveExcelAllWithNotCaption(tmpParamArray); } } function saveExcelAllWithCaption( sheetArray ) { // alert(gridCaptionArray); var fileName = window.fileDialog("save", ",", false, "excel", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls"); if( fileName == "" ) return; // var sheetArray = new Array("grd_bizprescondstats|¾÷¹«ÇöȲ", "grd_patprescondstats|ȯÀÚÇöȲ", "grd_hdstatsinfo|Ç÷¾×Åõ¼®ÇöȲ", "grd_pdstatsinfo|º¹¸·Åõ¼®ÇöȲ", "grd_pdbizstatsinfo|º¹¸·Åõ¼®¾÷¹«ÇöȲ"); var sheetArrayLen = sheetArray.length; var gridId; var gridObj; for( var i = 0; i < sheetArray.length; i++ ) { gridId = sheetArray[i].split("|")[0]; gridObj = document.all.item(gridId); // saveText() ÇÔ¼ö´Â CaptionÀúÀåÀÌ ºÒ°¡´É ÇÏ¿© SaveExcel()À» ÀÌ¿ëÇÑ´Ù. gridObj.saveExcel("C:\\Temp\\tmp_TFExcel_" + i +".xls"); } // excel application ½ÇÇàÇÔ tfexcel.launchnewinstance(0); //½ÇÇàµÈ excel application¿¡¼­ »õ·Î¿î workbookÀ» »ý¼º tfexcel.createworkbook(); /* ¹®Á¦ÀÖ´Â ·ÎÁ÷ ÁÖ¼®Ã³¸® 2013.06.13 ¼Õº´Àº tfexcel.activatesheet(1); var sheetName; var nResult; for( var i = 0; i < sheetArrayLen; i++ ) { sheetName = sheetArray[i].split("|")[1]; if( i > 1 ) { nResult = tfexcel.activatesheet(i+1); tfexcel.sheetname(i+1) = sheetName; } else { nResult = tfexcel.addsheet(i+1, sheetName); } if( nResult < 0 ) { messageBox(sheetName + " ÀúÀåÀ»", "E009"); // alert(sheetName + " ¿À·ù¹ß»ý"); return; } tfexcel.loadCSV("C:\\Temp\\tmp_TFExcel_" + i + ".xls"); } */ var sheetName; var nResult; for( var i = 0; i < sheetArrayLen; i++ ) { sheetName = sheetArray[i].split("|")[1]; if( i > 0 ) { nResult = tfexcel.addsheet(i+1, sheetName); }else{ nResult = tfexcel.activatesheet(i+1); } tfexcel.sheetname(i+1) = sheetName; if( nResult < 0 ) { messageBox(sheetName + " ÀúÀåÀ»", "E009"); // alert(sheetName + " ¿À·ù¹ß»ý"); return; } tfexcel.loadCSV("C:\\Temp\\tmp_TFExcel_" + i + ".xls"); } //workbookÀ» ÀúÀå. tfexcel.save(fileName); //excel applicationÀ» Á¾·á. excel application »ý¼º ÈÄ ¹Ýµå½Ã closeÇØ¾ßÇÔ. tfexcel.close(); var fso = new ActiveXObject("Scripting.FileSystemObject"); for( var i = 0; i < sheetArrayLen; i++ ) { fso.DeleteFile("C:\\Temp\\tmp_TFExcel_" + i + ".xls"); } var rmsg = messageBox("ÀúÀåµÈ ExcelÀ»", "Q004"); // var rmsg = window.alert("ÀúÀåµÈ ExcelÀ» ½ÇÇàÇϽðڽÀ´Ï±î?", "¾Ë¸²", 36); if( rmsg == 6 ) window.exec("excel.exe", '\"' + fileName + '\"'); } function saveExcelAllWithNotCaption( sheetArray ) { // alert(gridCaptionArray); var fileName = window.fileDialog("save", ",", false, "excel", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls"); if( fileName == "" ) return; // excel application ½ÇÇàÇÔ tfexcel.launchnewinstance(0); // ½ÇÇàµÈ excel application¿¡¼­ »õ·Î¿î workbookÀ» »ý¼º tfexcel.createworkbook(); // var sheetArray = new Array("grd_bizprescondstats|¾÷¹«ÇöȲ", "grd_patprescondstats|ȯÀÚÇöȲ", "grd_hdstatsinfo|Ç÷¾×Åõ¼®ÇöȲ", "grd_pdstatsinfo|º¹¸·Åõ¼®ÇöȲ", "grd_pdbizstatsinfo|º¹¸·Åõ¼®¾÷¹«ÇöȲ"); var sheetArrayLen = sheetArray.length; var gridId; var gridObj; var sheetName; var nResult; for( var i = 0; i < sheetArrayLen; i++ ) { gridId = sheetArray[i].split("|")[0]; gridObj = document.all.item(gridId); sheetName = sheetArray[i].split("|")[1]; if( i > 1 ) { nResult = tfexcel.activatesheet(i+1); tfexcel.sheetname(i+1) = sheetName; } else { nResult = tfexcel.addsheet(i+1, sheetName); } if( nResult < 0 ) { messageBox(sheetName + " ÀúÀåÀ»", "E009"); // alert(sheetName + " ¿À·ù¹ß»ý"); return; } gridObj.saveText("C:\\Temp\\tmp_TFExcel.csv", "\n", ",", '\:', true); tfexcel.loadCSV("C:\\Temp\\tmp_TFExcel.csv"); } //workbookÀ» ÀúÀå. tfexcel.save(fileName); //excel applicationÀ» Á¾·á. excel application »ý¼º ÈÄ ¹Ýµå½Ã closeÇØ¾ßÇÔ. tfexcel.close(); // CSV File »èÁ¦ var fso = new ActiveXObject("Scripting.FileSystemObject"); fso.DeleteFile("C:\\Temp\\tmp_TFExcel.csv"); var rmsg = messageBox("ÀúÀåµÈ ExcelÀ»", "Q004"); // var rmsg = window.alert("ÀúÀåµÈ ExcelÀ» ½ÇÇàÇϽðڽÀ´Ï±î?", "¾Ë¸²", 36); if( rmsg == 6 ) window.exec("excel.exe", '\"' + fileName + '\"'); } function createTFExcel(tfExcelID, parentObj) { if( parentObj == null ) parentObj = body; var tfExcelObj = parentObj.createChild("xforms:object", "id:" + tfExcelID + "; clsid:{fe8d1001-6a9d-424d-ae2a-301493bb12da}; left:100px; top:100px; width:100px; height:100px; "); return tfExcelObj; } /************************************************************************************************************************/