|
|
@@ -1666,21 +1666,23 @@ var gagaAgGrid = {
|
|
|
/**
|
|
|
* 그리드 데이터를 엑셀로 내보내기
|
|
|
* <pre>
|
|
|
- * gagaAgGrid.exportToExcel('주문목록', gridOptionsOrderList, columnDefs);
|
|
|
+ * gagaAgGrid.exportToExcel('주문목록', gridOptionsOrderList, columnKeys);
|
|
|
* or
|
|
|
- * gagaAgGrid.exportToExcel('주문목록', gridOptionsOrderList, columnDefs, true);
|
|
|
+ * gagaAgGrid.exportToExcel('주문목록', gridOptionsOrderList, columnKeys, true);
|
|
|
* </pre>
|
|
|
* @param title - 엑셀의 타이틀
|
|
|
* @param gridOptions - Grid options
|
|
|
- * @param columnDefs - Column definitions
|
|
|
+ * @param columnKeys - Column keys (출력하고자 하는 칼럼 정의)
|
|
|
* @param isSelected - true/false
|
|
|
* @author gagamel
|
|
|
* @since 2019. 6. 7
|
|
|
*/
|
|
|
exportToExcel : function(title, gridOptions, isSelected) {
|
|
|
+ var sColumnKeys = (typeof(columnKeys) == 'undefined') ? [] : columnKeys;
|
|
|
var bOnlySelected = (typeof(isSelected) == 'undefined') ? false : isSelected;
|
|
|
|
|
|
var params = {
|
|
|
+ columnKeys: sColumnKeys,
|
|
|
onlySelected: bOnlySelected, // true: Only export selected rows
|
|
|
fileName : title + "_" + new Date().format("YYYYMMDDHHmmss"),
|
|
|
sheetName: "DATA"/* ,
|