ngx-excel-template
v0.1.2
Published
excel file template It organizes your excel files that you have prepared as template.
Downloads
5
Readme
NgxExcelTemplate
excel file template It organizes your excel files that you have prepared as template.
edit {name} as key and value
install
npm i ngx-excel-template
usage
interface KeyValuePair {
key: string;
value: string;
}
@Component({
selector: 'app-file-template',
templateUrl: './file-template.component.html',
styleUrls: ['./file-template.component.scss']
})
export class FileTemplateComponent implements OnInit {
filepath = 'assets/test.xlsx';
constructor( private excelService: NgxExcelTemplateService) { }
ngOnInit() {
}
getFile() {
this.excelService.exportExcel(this.filepath, 'filename.xlsx', 'Seetname', this.setvalues() );
}
setvalues(): KeyValuePair[] {
const data: KeyValuePair[] = [
{ key: 'name', value: 'John' },
{ key: 'age', value: '123' },
];
return data;
}
}