Export 2 excel from database

Hi,

first question in the forum… :slight_smile: I’m newbie …
Did sample with mySql and all is working very fine. Solid product, easy to learn. I’m very fine with webix.

Can’t find info, how to export to excel from datatable more than datafetch set.
Now I set datatfetch ( as limit for queries in mySql ) to 200. And, of course ,excel export only this data, 200 rows. Now in mySql table exist about 4K records.
How to let to export to use data binding without limit set ? I have and possibility to send to server parameter something as “cmd=xls”. But don’t know how to do that and how to stick it to export …

Many thanks in advance.

Hi,
It seems that no solution for this … :frowning:

No problems … Simply when exist possibility in the same library it want to use that. I have a small module, using exceljs and filesaver. It can be adopted with webix.

With best regards! :slight_smile:

Hi again,

Simply tried something like that - it’s working … :slight_smile:

  function exp2Excel( pObj, gid )
  {
     let gro = $$( gid ),
     old_url = gro.config.url // old get url with datafetch
     
     gro.config.url = function( params ) 
     {
        params = ( typeof params == 'undefined' || params == null ? {} : params )
        params.cmd = 'xls' // new parameter do not use datafecth
        params.pnk = pObj.pusl_prm
        params.grd = gid
        params.whr = pObj.gridai[ gid ].grido_filtras
        return webix.ajax().post( pObj.gridai[ gid ].grido_conf.urlas, params )
     }
     
     gro.clearAll()
     gro.load( gro.config.url )
     
     setTimeout( () =>  // setTimeout needful to load new data
     {
        webix.toExcel( $$( gid ), 
        {
           filename   : "bandymas",
           filterHTML : true,
           styles     : true
        })
  
        gro.config.url = old_url // return to old url with datafetch 
        gro.clearAll()
        gro.load( gro.config.url )
        
     }, 1000 )
  }

Maybe someone will need it … :slight_smile:

Have a nice day!