Author Topic: Is there any events for manipulating data when importing excel?  (Read 942 times)

juroinstruments

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 9
    • View Profile
Is there any events for manipulating data when importing excel?
« on: October 05, 2021, 11:38:18 am »
Hi.

I'm struggling with developing method for manipulating excel import using paramquery.
When importing excel data, it may have cells to be rendered or to be replaced with a map of other data.
so I want to engage with an event when importing excel.

is there any appropriate events for it?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6125
    • View Profile
Re: Is there any events for manipulating data when importing excel?
« Reply #1 on: October 05, 2021, 10:28:44 pm »
import of Excel can be separated into 2 steps:

Import xlsx -> js workbook -> import into grid.

Code: [Select]
                            //import xlsx file into workbook.
                            pq.excel.importXl( {file: file}, function( wb ){
                               
                                //import workbook into grid.                           
                                grid.importWb({workbook: wb, extraRows: 10, extraCols: 10});
                                grid.hideLoading();
                            })

https://paramquery.com/pro/demos/import-xlsx

Example of structure of js workbook: https://paramquery.com/pro/demos/js-workbook

You can make data changes in the js workbook.
« Last Edit: October 05, 2021, 10:30:59 pm by paramvir »