Export XLSX to CSV on schedule with Python
Recipe ToolsMarketingDocument/FileSales EnablementDeveloper Tool
What it does
When a scheduled trigger runs every 5 minutes, this automation downloads an Excel file from Google Drive. Python code converts it to CSV format, the result is stored in file storage, and the job report logs each step.
Who it's for
Data and analytics teams who need to convert Excel files to CSV on a regular schedule without manual work.
How teams use this
Automate Excel to CSV exports
Convert Excel files to CSV every 5 minutes without opening the files manually. The CSV is ready in file storage for analytics tools or database imports.
Feed CSV data to a data warehouse
Store the converted CSV in file storage so a downstream process can ingest it into a data warehouse or analytics platform. Only the destination changes.
Convert multiple sheets to separate files
Extend the Python code to check for multiple sheets in the Excel file and create a separate CSV for each one. The schedule and storage location stay the same.
How it works
- Run on a 5-minute schedule. This automation starts every 5 minutes so the Excel file is converted to CSV at regular intervals.
- Download the Excel file. Retrieve the file contents from Google Drive so the Python code can process it.
- Convert Excel to CSV with Python. Execute Python code in Py Eval to transform the Excel data into CSV format for storage and use.
- Save the CSV file. Create the converted CSV file in file storage so it is available for download or further processing.
- Log the conversion result. Record the outcome in the job report so someone can verify the file was converted and stored successfully.