exl-parser
v0.1.5
Published
This library is Excel parser which takes Excel file as input and return table as view and Json Data as response. Demo Click Here (https://angular-excel-read-table-16p1jv.stackblitz.io/)
Downloads
23
Maintainers
Readme
Excel Parser
This library is Excel parser which takes Excel file as input and return table as view and Json Data as response. Demo Click Here (https://angular-excel-read-table-16p1jv.stackblitz.io/)
Implimentation
app.component.html
<input type="file" (change)="fileUPload($event)">
<rzn-exl-parser [file]="testFile"
(excelData)="dataFromExcel($event)">
</rzn-exl-parser>
app.component.ts
import {Component} from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
testFile: any;
fileUPload(event: any) {
this.testFile = event;
}
dataFromExcel(data:any){
console.log(data);
}
}
app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import {ExlParserModule} from 'exl-parser';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
AppRoutingModule,
ExlParserModule,
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }