shael-core v1.0.8
Core
This library was generated with Angular CLI version 8.2.0.
Use of code
ExcelService -
a) to create excel file you need to call - exportExcelSheet(jsonData,filename )
jsonData - [ {
id: 'e101',
name: 'Shashikant',
sal: 1000
}, {
id: 'e102',
name: 'Shubhangini',
sal: 2000
}, {
id: 'e103',
name: 'Dayanand',
sal: 3000
} ];
fileName - Should be the name of the file we are expecting
b) to read excel file and convert into json. (note - only singlefile would be read)
1) provide file having format .xls|.xslx
2) call readExcelSheet( file:any ) method
3) get the json data in [[ titles ] , [data (1st row)]] etc
Code scaffolding
Run ng generate component component-name --project core
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project core
.
Note: Don't forget to add
--project core
or else it will be added to the default project in yourangular.json
file.
Build
Run ng build core
to build the project. The build artifacts will be stored in the dist/
directory.
Publishing
After building your library with ng build core
, go to the dist folder cd dist/core
and run npm publish
.
Running unit tests
Run ng test core
to execute the unit tests via Karma.