title: How to store Excel file in s3 using aws-sdk in node js?
body: <pre><code>    var xls = json2xls(data);
      var bufferdata = new Buffer(xls).toString('base64');
      console.log("inside upload s3 function........", data);
      //var buf = new Buffer(data, 'base64');
      var uploaddata = {
          Key: "exception.xls",
          Body: bufferdata,
          ContentEncoding: 'base64',
          ContentType: 'application/vnd.ms-excel'
      };
  </code></pre>
  
  <p>I am able to save and retrieve the file over s3. But Format mismatch is coming up. Please help me as how to solve this.</p>