0

I have been building this web app using nodejs in which i need to send the Excel file to the client over web sockets. I tried using delivery.js but i was not able to achieve the result. Then i tried socket.io-stream. There are examples for image stream. I wanted to know how i can stream excel file to the client so that they can download the file. If it is same as image then what should be there in place of image/png;base64

  • 1
    use the excel mime type. – Daniel A. White Oct 09 '18 at 18:19
  • If you Google for the keywords "excel mime type", you'll see application/vnd.ms-excel pop up for .xls and application/vnd.openxmlformats-officedocument.spreadsheetml.sheet pop up for .xlsx. – Ates Goral Oct 09 '18 at 18:21
  • @AtesGoral Can you please provide some example of its usage? My code was this - `$("#result").attr("href","data:application/vnd.ms-excel;base64,"+window.btoa(binaryString))` Here binaryString is the data im getting from the server. – Karthik P K Oct 10 '18 at 09:11

0 Answers0