File Service Configuration
File service configuration is service file used to export files like excel, pdf.
How to use it?
<button class="btn btn-info" (click)="exportData('table')">
<i class="mdi mdi-file-excel mr-1"></i> Export
</button>
<button class="btn btn-info" (click)="exportPDFData('table.pdf')">
<i class="mdi mdi-file-pdf mr-1"></i> Pdf
</button>
exportData(excelFileName){
exportAsExcelFile(json: any[], excelFileName: string);
}
exportPDFData(filename){
createPDFContent(headers:string[], body:Array<any>)
}
exportAsExcelFile(json: any[], excelFileName: string) used to export excel file. It takes two parameters, JSON and ExcelFilename.
JSON file is excel data
ExcelFilename is download file name



