What is the proper Content-Type string for an Excel (xlsx) file row attachment?

Hello, I have an Excel document (xlsx) that I want to upload to a row through the API. My code does successfully upload the file as a row attachment. However, when I download the file through Smartsheet and try to open it, I get an error "Excel cannot open the file 'file_name.xlsx' because the file format or file extension is not valid'. If I manually upload the original file myself to the Smartsheet row, and then download it, the downloaded file opens without error. I only get the error when I upload the file through the API. I'm using "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" as the Content-Type string. Is that not correct?

Best Answer

Answers