Angular2 export csv
Angular2 CSV
angular2에 csv 파일로 만들어주는 라이브러리가 있다.Installation
npm install --save angular-csvcode
import { Angular2Csv } from 'angular2-csv/Angular2-csv';
options = {
fieldSeparator: ',',
quoteStrings: '"',
decimalseparator: '.',
showLabels: true, // csv 파일에 헤더가 추가된다.
showTitle: false
};
modal_confirm(){
this.service.log()
.subscribe(res => {
new Abgykar2Csv(res.json(), 'file_name');
// new Angular2Csv(res.json(),'file_name', options); });
}
댓글
댓글 쓰기