Foot
영역에 고정된 행을 생성하여 열의 합계나 평균값을 보여줍니다.
포뮬러행에는NoColor:2
속성이 기본으로 들어갑니다.
SearchMode:3, 4
일 경우에는 사용 할 수 없습니다.
숫자형 컬럼(Int
,Float
)를 제외한 다른 컬럼은"Count"
만 사용 가능합니다.
mixed
( string
| function
)
Value | Description |
---|---|
'Sum' |
열의 합계값 |
'Avg' |
열의 평균값 |
'Max' |
열의 최대값 |
'Min' |
열의 최소값 |
'Count' |
행의 개수 |
function |
사용자 정의 함수 |
options.Cols = [
// ...
{
Type: "Int",
Name: "qt",
FormulaRow: "Sum",
Width: 120,
// ...
},
{
Type: "Int",
Name: "rate",
FormulaRow: "Avg",
Width: 120,
// ...
},
{
Type: "Int",
Name: "brnSaleAmt",
FormulaRow: "Max",
Width: 120,
// ...
},
{
//사용자 정의 함수(글자색이 "#FF0000"인 행의 수 리턴)
Type: "Text",
Name: "user",
FormulaRow: function(fr){
var rows = fr.Sheet.getDataRows();
var count = 0;
for(var i = 0; i < rows.length; i++){
if( rows[i].TextColor == "#FF0000"){
count++;
}
}
return "경고 :" + count + "건";
},
Width: 120,
// ...
},
// ...
];
// 객체 직접 접근하여 처리
sheet.getRowById("FormulaRow")["sDetailVisible"] = 1; // 셀의 Visible 속성변경.
sheet.getRowById("FormulaRow")["sDetail"] = "가나다";
sheet.refreshRow(sheet.getRowById("FormulaRow"));
product | version | desc |
---|---|---|
core | 8.0.0.0 | 기능 추가 |