How to develop backend code for creating excel

Moderator: Support

Pritish
Posts: 3
Joined: Thu Jul 23, 2020 3:30 am

How to develop backend code for creating excel

Post 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.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Re: How to develop backend code for creating excel

Post 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.

Pritish
Posts: 3
Joined: Thu Jul 23, 2020 3:30 am

Re: How to develop backend code for creating excel

Post 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.

Serhii Kulibaba
Posts: 147
Joined: Tue Aug 27, 2013 1:47 pm

Re: How to develop backend code for creating excel

Post 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

Post Reply