PHP script that reads a CSV/Excel file, updates specific columns, and exports a clean, modified version automatically.
php-excel-file-updater is a simple server-side PHP utility designed to automate the bulk editing of CSV and Excel files. It opens an existing file, iterates through each row, applies custom transformations to targeted columns (such as reformatting dates or overwriting values), and saves the result as a new output file — all without any manual intervention. Ideal for data cleanup, batch processing, or quick file migrations.
Clone the repository and place it in your PHP-enabled server directory:
git clone https://github.com/Cyrus2401/php-excel-file-updater.git
cd php-excel-file-updater- Place your source CSV file in the project root and name it
file_example.csv - Open
index.phpand edit the transformation logic to match your needs:
$data[7] = "Your custom value"; // Targets the 7th column (0-indexed)- Run the script via your local server:
http://localhost/php-excel-file-updater/index.php
- The modified file will be generated as
file_example_fixed.csvin the project root.