Methods
(static) exportPdf(props)
그리드데이터를 PDF로 export합니다
Example
var props = {
target: 'local',
exportUrl: '',
fileName: '우리나라PDF파일',
pageSize: 'A4',
excludeHiddenColumn: false,
fontFamily: 'NanumGothic',
compress: false,
tableHeader: {
fontSize: 10,
bold: false,
color: '#000000',
fillColor: '#d4d4d4'
},
headers: [
{
text: '사원정보',
align: 'right',
style: {
fontSize: 18,
bold: false,
color: '#ff0000',
background: '#ffffff'
}
},
{
text: '사원정보를 출력합니다',
align: 'justified',
style: {
fontSize: 8,
bold: false,
color: '#0000ff',
background: '#ffffff'
}
}
]
}
grid.exportPdf(props);
Parameters:
Name |
Type |
Description |
props |
Object
|
옵션
Properties
Name |
Type |
Default |
Description |
includeStyle |
boolean
|
false
|
스타일포함여부(준비중) |
target |
string
|
'local'
|
다운로드 타겟(local 또는 remote) |
exportUrl |
string
|
''
|
다운로드 URL |
fileName |
string
|
'NanumGothic'
|
저장할 파일명 |
pageSize |
string
|
'A4'
|
페이지사이즈 |
excludeHiddenColumn |
boolean
|
true
|
숨긴컬럼제외여부 |
compress |
boolean
|
false
|
압축여부 |
tableHeader |
Object
|
|
테이블 해더 스타일 정보
Properties
Name |
Type |
Default |
Description |
fontSize |
number
|
13
|
테이블 해더 스타일(폰트크기) |
bold |
boolean
|
false
|
테이블 해더 스타일(폰트두께 bold) |
color |
string
|
'#000000'
|
테이블 해더 스타일(글씨색상) |
fillColor |
string
|
'#ffffff'
|
테이블 해더 스타일(배경색) |
|
fontFamily |
string
|
|
PDF로 저장시 적용될 폰트명 |
headers |
Array.<Object>
|
|
PDF 상단에 표시할 추가 텍스트(제목이나 부제목 같은 내용)
Properties
Name |
Type |
Default |
Description |
text |
string
|
''
|
엑셀에 표시할 텍스트 |
align |
string
|
'left'
|
텍스트 정렬(left, right, center, justify) |
style |
Object
|
|
행의 스타일
Properties
Name |
Type |
Default |
Description |
fontSize |
number
|
10
|
폰트크기 |
bold |
boolean
|
false
|
폰트두께 bold |
color |
string
|
'#ffffff'
|
글씨색상 |
|
|
|
(static) exportXlsx(props)
그리드데이터를 엑셀로 export합니다
Example
var props = {
includeStyle: true,
target: 'local',
exportUrl: '',
fileName: 'excelFile',
sheetName: 'excelSheet',
excludeHiddenColumn: true,
fontFamily: '맑은 고딕',
fixedColumnCount: 0,
fixedRowCount: 0,
headers: [
{
text: '',
height: 20,
style: {
fontSize: 18,
fontWeight: 'normal',
textAlign: 'center',
underline: false,
color: '#000000',
background: '#ffffff'
}
}
]
}
grid.exportXlsx(props);
Parameters:
Name |
Type |
Description |
props |
Object
|
옵션
Properties
Name |
Type |
Default |
Description |
includeStyle |
boolean
|
false
|
스타일포함여부 |
target |
string
|
'local'
|
다운로드 타겟(local 또는 remote) |
exportUrl |
string
|
|
다운로드 URL |
fileName |
string
|
'downloadFile'
|
저장할 파일명 |
excludeHiddenColumn |
boolean
|
true
|
숨긴컬럼제외여부 |
fontFamily |
string
|
'맑은고딕'
|
엑셀로 저장시 적용될 폰트명 |
|
(static) setExportUrl(url, type) → {undefined}
다운로드 주소 설정
Parameters:
Name |
Type |
Description |
url |
string
|
다운로드 주소 |
type |
string
|
다운로드 파일유형(xlsx 또는 pdf) |
Returns:
-
Type
-
undefined