1

I'm creating a file upload system in my React app that allows users to upload an Excel spreadsheet to an S3 bucket which can then be converted to a CSV.

const submitFile = (substring) => {
  const ReactS3Client = new S3(config);
  ReactS3Client.uploadFile(file, substring).then(data => {
    if (data.status === 204) {
      alert("File successfully uploaded");
    } else {
      alert("Something went wrong");
    }
  })
};

I'm wondering if it's possible to take the Excel spreadsheet file and convert it to a CSV file before I upload it to the S3 bucket. I haven't been able to find much about this so I'm not sure if it's possible.

1 Answer 1

1

It looks like the npm package, xlsx, may have a utility for doing just that.

Take a look at the XLSX.utils.sheet_to_csv util.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.