excel4node icon indicating copy to clipboard operation
excel4node copied to clipboard

excel4node and Azure Functions

Open ikochetkov opened this issue 4 years ago • 1 comments

Hi ! Using currently excel4node with expressJS. Sending the object and receiving binary data of excel Want to go away from local server and move it to Azure Functions. Can someone tell is it possible and maybe someone has example how it should looks like?

ikochetkov avatar Sep 13 '21 09:09 ikochetkov

Adding some details here: So AF using the following synthax to send the data back module.exports = async function (context, req) { try { context.res = { body: "Success!" }; } catch(error) { const err = JSON.stringify(error); context.res = { status: 500, body: Request error. ${err} }; } };

So looks like we can use our method: wb.write('Excel.xlsx', res); but instead res - context.res.

However, this not work. Any suggestions guys how return excel from Azure Functions?

ikochetkov avatar Sep 27 '21 15:09 ikochetkov