I’ve been trying to upload an excel file via the API for analysis with the code interpreter tool, however the response from the API is that the file type isn’t supported.
filename = "tables.xlsx"
cw_file = openai.files.create(
file=open(filename, 'rb'),
purpose='assistants',
)
This code block works fine for .csv and .docx files however xlsx files return the following error:
BadRequestError: Error code: 400 - {'error': {'message': "Invalid file format. Supported formats: ['c', 'cpp', 'csv', 'docx', 'html', 'java', 'json', 'md', 'pdf', 'php', 'pptx', 'py', 'rb', 'tex', 'txt', 'css', 'jpeg', 'jpg', 'js', 'gif', 'png', 'tar', 'ts', 'xlsx', 'xml', 'zip']", 'type': 'invalid_request_error', 'param': None, 'code': None}}
It explicitly states .xlsx is supported in the error message so it seems like a bug. Has anyone been able to successfully upload an Excel file to the /files API?