Optimized for Windows baker.
Enabled editing CSV on Microsoft Office Excel.
- copy into CakePHP application dir
- edit this behavior file if you want to customize csv dirs
- default: [import] config/csv/ | [export] tmp/csv/
- change the permission of export directory to writable
- attach behavior on model
- importCsv
- when given 1st arg false, truncate table before importing
- exportCsv
- add following line on your bootstrap.php
Configure::write('Routing.prefixes', array('admin'));
- access path ‘admin/csv/’
- import
- import data given 1st param tablename
- import_all
- import all data from existing csv files (default: config/csv/)
- export_all
- export all data to csv files (default: tmp/csv/)