Python Prompts Free Prompt

Python Script to Convert Excel to CSV and Vice Versa

Create a Python script to convert Excel files (.xlsx) to CSV and CSV to Excel
☆ Save
Prompt
You are a Python developer. Write a script using pandas that converts between Excel and CSV formats. The script must: 1) Accept input and output file paths, 2) Handle multiple sheets in Excel (convert each to separate CSV or combine), 3) Preserve data types, 4) Provide options for delimiter, encoding, and header, 5) Support batch conversion of multiple files, 6) Log progress and errors. Add comments and a requirements.txt.

How to use this prompt

1
Click Copy Prompt above to copy to your clipboard.
2
Open ChatGPT, Claude, Gemini, or any AI assistant and paste the prompt.
3
Replace any [PLACEHOLDER] values with your specific details.
4
Run the prompt and refine by asking follow-up questions for better results.