Author Topic: Spreadsheet functionality with table data  (Read 92 times)

entwine.llc.wi

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 15
  • Consultant
    • View Profile
Spreadsheet functionality with table data
« on: December 12, 2024, 08:06:40 am »
Is it possible to load data from a database table and then allow users to add/manipulate a custom formula column? If it is possible, can the new formula column be saved as part of the Grid State?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6323
    • View Profile
Re: Spreadsheet functionality with table data
« Reply #1 on: December 16, 2024, 01:59:41 pm »
There is no online example doing the exact thing, but conceptually yes, it's feasible.

Spreadsheet functions are stored in pq_fn property of rowData as shown in this example: https://paramquery.com/pro/demos/excel_formula

you can add extra column in the table to save Spreadsheet formula corresponding to each column expecting a formula.

When data is posted to remote server, extract formula from pq_fn and save in respective columns.

When data is fetched from the server, add pq_fn property ( containing the formulas ) back to the rowData in json data.