File download question

Question:
I write code and output xlsx excel file then I download it.But I failed to open the downloaded file.It seems damaged

Repl link/Link to where the bug appears:

Screenshots, links, or other helpful context:

code snippet

Welcome to Ask @heyogurt1214!

Is the file damaged in the Replit Filesystem?

OP says after they downloaded it, the file cannot be opened.

in replit it’s normal I can read data through pandas but when I download it I can open it