Page 1 of 1

How to develop backend code for creating excel

Posted: Thu Jul 23, 2020 3:36 am
by Pritish

Hello Appery team,

Code: Select all

I want to generate excel at  backend and want to  download from front-end. 

As most of our front end uses same excel format only data can be changes which is available at backend so keeping code at backend is more maintainable and I can pass require parameter to download Excel with specific coloumn and data.

Also I cannot use npm liberary and tried to use excelJs liberary but could not able to create Excel object.

Please help me in same.


Re: How to develop backend code for creating excel

Posted: Fri Jul 24, 2020 11:44 am
by Evgene Karachevtsev

Hello Pritish,

This would be very hard to implement. You may try to search for and use some corresponding Cordova plugins and try creating Excel file in the app, but not on Appery.io backend.


Re: How to develop backend code for creating excel

Posted: Mon Jul 27, 2020 7:27 am
by Pritish

Hello Appery Team,

I have manage to create xcel at backend by importing Xsxl javascript as plugin however it's in binary form now I want to get this response at frontend and convert into

new Blob([s2ab(wbout)],{type:"application/octet-stream"}).

For refence in link https://redstapler.co/sheetjs-tutorial-create-xlsx/

I have completed Step :- var wbout = XLSX.write(wb, {bookType:'xlsx', type: 'binary'});

but how I can download same as excel as Blob type is not supporting.


Re: How to develop backend code for creating excel

Posted: Thu Jul 30, 2020 2:01 pm
by Serhii Kulibaba

Hello,

You are right, it is not possible to use Blob objects in Appery.io Server Code, it is allowed only on the client-side