ce icon indicating copy to clipboard operation
ce copied to clipboard

add row in jexcel angualr

Open gargri opened this issue 6 years ago • 3 comments

sir i m facing a problem, i m not able to understand how i can add new row in jexcel in angular , i m using typescript so can u help me to add new button without jquery

gargri avatar Aug 17 '20 05:08 gargri

This is the script: https://codesandbox.io/s/pensive-curie-bpve3

pphod avatar Aug 19 '20 20:08 pphod

thanku sir for reply me, can u tell me how i van change cell value after onchange event

gargri avatar Aug 20 '20 06:08 gargri

https://codesandbox.io/s/twilight-hooks-moq79

export class AppComponent {
  @ViewChild("spreadsheet") spreadsheet: ElementRef;
  @ViewChild("button") button: ElementRef;
  title = "an";

  ngAfterViewInit() {
    var t = jexcel(this.spreadsheet.nativeElement, {
      minDimensions: [40, 10],
      onchange: function (element, cell, x, y, value, oldValue) {
        alert(value);
      }
    });

    this.button.nativeElement.onclick = function () {
      t.insertRow();
    };
  }
}

pphod avatar Aug 20 '20 20:08 pphod