Excel문서에 제목 추가하기
exportGrid() 함수를 사용해서 Excel 문서를 내려 받을 때 GridExportOptions의 documentTitle, documentSubtitle, documentTail 속성을 이용하여 Excel문서에 제목, 부제, 꼬릿말을 추가할 수 있습니다.
documentTitle - 제목 documentSubtitle - 부제 documentTail - 꼬릿말 Title옵션의 세부 속성은 아래와 같습니다.
//*.css
.documentStyle {
border: 1px solid blue;
}
//index.html
gridView.exportGrid({
type: 'excel',
target: 'local',
documentTitle: { //제목
message: "리얼그리드 제목1",
visible: true,
spaceTop: 1,
spaceBottom: 0,
height: 60,
styleName: "documentStyle"
},
documentSubtitle: { //부제
message: "작성자 : 리얼그리드
작성일 : ",
visible: true,
height: 60
},
documentTail: { //꼬릿말
message: "리얼그리드 꼬릿말",
visible: true
}
});
styles 형식이 1.0의 VisualStyles형식에서 css 형식으로 변경되었습니다.
스타일 미지정 시 텍스트는 좌측 상단에 표시됩니다.