cscan / vue-excel-editor

Vue2 plugin for displaying and editing the array-of-object in Excel style
MIT License
557 stars 108 forks source link

excel formula support #121

Closed lanbin45 closed 2 years ago

lanbin45 commented 2 years ago

Hi, so excite to meet this lib and thanks for your excellent work! Does this lib support excel formula? I have one feature to edit formula in a cell and calculated result displayed in the target cell, just like what did in a true excel app.

BTW, it will be better when offering an online demo for these developers who want to do a quickly feature check with this wonderful lib.

cscan commented 2 years ago

The component does not support formula. The following hacked way may not help but it can serve if you want a calculated field only:

jsondata = [{
  name: "John",
  surname: "Smith",
  get fullName() {
    return `${this.name} ${this.surname}`;
  }
}, {
  name: "Mary",
  surname: "Svensson",
  get fullName() {
    return `${this.name} ${this.surname}`;
  }
}]

For the online demo, there are some contributors offer some example in the codesandbox, you could visit:

https://codesandbox.io/examples/package/vue-excel-editor