How do I let users upload an Excel file to an OpenAI Agent and get a processed Excel file back?

Hi everyone! I’m building an Agent in the OpenAI platform and I’m a bit lost. I have very little programming experience, so sorry if this is a basic question.

I want the Agent to do this:

  1. The user uploads an Excel file (ad-hoc, any structure).

  2. The Agent processes that file (clean data, create new columns, run some logic, etc.).

  3. The Agent outputs a new Excel file for the user to download.

I’ve read about tools and function calling, but I still don’t understand how to let the user upload the file, how the Agent is supposed to read/process it, and how to return an Excel file as output.

Does anyone know the correct setup?
Do I need a custom tool for file handling, or can this be done with the built-in file tools?

tools → code interpreter

The AI using its Python Jupyter notebook to write scripts to process files is the only method, using modules that are available for document extraction and document format writing.

Excel is particularly nasty for arbitrary documents. Even if you are a seasoned programmer, you’ll have a hard time accessing files by code with unknown multiple pages of pivot tables and diagrams, merged cells and formatting - and code within, beyond unrendered formulas. Then having Python return something understandable back to the AI as a printed output about the document, to then have the AI write more scripts.