diff --git a/src/main/webapp/resources/js/fims/framework/cmm/cmmUtil.js b/src/main/webapp/resources/js/fims/framework/cmm/cmmUtil.js index a76a1f93..0917df3c 100644 --- a/src/main/webapp/resources/js/fims/framework/cmm/cmmUtil.js +++ b/src/main/webapp/resources/js/fims/framework/cmm/cmmUtil.js @@ -1,3 +1,33 @@ +//엑셀 파일 생성 정보 +function getColDefs($th, $td){ + var colDefs = []; + + for(var i=0; i < $th.length; i++){ + + var label = $th.eq(i).text(); + + if(label != ""){ + + var width = $th.eq(i).outerWidth(); + width = Math.ceil(width/10) + 2; + var field = $td.eq(i).text(); + field = field.replace("{", ""); + field = field.replace("}", ""); + + var colDef = { + label : label, + width : width, + field : field + }; + + colDefs.push(colDef); + } + + } + + return JSON.stringify(colDefs); +} + /************************************************************************** * 지연 **************************************************************************/