reactjsdownloadexcel4node

excel4node with React , how to create the file without having to save it?


In excel4node I can create a file using write or I can write to buffer as follows:

wb.writeToBuffer().then(function (buffer) {

// Do something with buffer

});

How I can take the buffer and then make React download a file to the Browser ?


Solution

  • excel4node did not work with React.

    It seems that only works on nodejs server side.

    I ended up using https://www.npmjs.com/package/xlsx