title: Downloading an excel file from aws s3
body: <p>I need a service to download an excel file from Amazon S3. It should also work on all applications like chrome, firefox and IE.</p>
  <pre><code>    const s3 = new aws.S3();
  
      s3.config.update({
          region: process.env.REACT_APP_AWS_DEFAULT_REGION,
          accessKeyId: process.env.REACT_APP_AWS_ACCESS_KEY_ID,
          secretAccessKey: process.env.REACT_APP_AWS_SECRET_ACCESS_KEY,
      });
  
      const S3_BUCKET = process.env.REACT_APP_AWS_STORAGE_BUCKET_NAME;
  
      const params = {
          Bucket: `${S3_BUCKET}`,
          Key: `${name}.xlsx`,
      };
  
      s3.getObject(params, function (err, data) {
          if (err) {
              message.error('Not able to download file. Please try again later.');
          } else {
              console.log(data);
              let blob = new Blob([data.Body], {
                  type: data.ContentType,
              });
              let link = document.createElement('a');
              link.href = window.URL.createObjectURL(blob);
              link.click();
              link.download = name + '.xlsx';
              message.success('File download successfully.');
          }
      });
  };
  </code></pre>
  <p>But this is donwloading a zip file containing xml files. Not sure why.
  <strong>I just want to download the file, not parse it</strong></p>