var WORKBOOK = {
"FontName":"맑은 고딕"
, "FontSize" : 10
, "Styles": [
{
"Font": "font-family:궁서체;font-size:24;font-color:#FFC00000;font-weight:bold;",
"Horizontal": "center",
"Vertical": "center",
"Name": "S3"
},
]
, "WorkSheets": [
{
"Name":"Sheet1"
, "DisplayGridlines":"false"
, "Ranges": [
{"Range" : "B9", "Value" : "1번 그리드", "ColSpan": 5, "Style": "S3"},
{"Range" : "B18", "Value" : "1번 그리드", "ColSpan": 5, "Style": {
"Font": "font-family:궁서체;font-size:18;font-color:#FF7030A0;",
"Fill": "solid,#FFDBDBDB",
"Horizontal": "center",
"Vertical": "center"
}
},
]
}
]
};
Matrix.getObject('BTN_EXPORT_EXCEL').OnClick = function(s, e){
Matrix.ExcelExportServiceCall(WORKBOOK ,null ,function(e){
if(e.Success == false){
alert("export fail::" + e.Message);
return;
}
// download file
var row = e.DataSet.GetTable(0).GetRow(0);
var folderName = row.GetValue("FolderName");
var fileName = row.GetValue("FileName");
var nowText = Matrix.GetDateTime().ToString("yyyy-MM-dd HH:mm:ss");
// download.maf 주소
Matrix.DownloadFile(folderName + "/"
, fileName
, Matrix.GetReportInfo().NAME + "_" + nowText + ".xlsx", true, null);
});
}; |