Recently I’ve had the need to generate extremely large CSV, ODS & XLSX files for testing. I’ve ended up creating a CSV dummy data generation tool in PHP which is capable of generating large datasets in a relatively small amount of time.
Check it out on GitHub: Sheet Faker – CSV / Excel test data generation.
As it says on the tin, Sheet Faker allows you to efficiently create large CSV, ODS & XLSX files containing fake / test data.
# Install via composer composer create-project olsgreen/sheet-faker cd sheet-faker # Run ./faker generate csv
Not got composer installed? See here.
- format – CSV, ODS or XLSX
- path – Fully qualified writable path to save the file.
- –locale – The desired locale of the test data see here for a list of available locales.
- –rows – The number of rows to generate.
- –columns – A comma separated list of columns specified using Faker formatter names see here for a full list of possible data types.
./faker generate csv /data/my.csv --rows=1000 --columns=firstName,lastName,email --locale=fr_FR
The CSV file generated would be saved to /data/my.csv, have the column headers of First Name, Last Name & Email and contain 1000 rows of fake data based on French locale.
Released under the MIT Licence. See the bundled LICENSE file for details.