ImportCSV is used for load positions from CSV file to database. This is an extension for Yii Framework.
Import occurs in three steps:
- Upload file;
- Select delimiters and table;
- Select mode and columns in table.
Module has 3 modes:
- Insert all - Add all rows;
- Insert new - Add new rows. Old rows remain unchanged;
- Insert new and replace old - Add new rows. Old rows replace.
All parameters from the previous imports will be saved in a special .php file in upload folder.
Yii 1.1
-
Copy all the 'importcsv' folder under /protected/modules;
-
Register this module in /protected/config/main.php
'modules'=>array( ......... 'importcsv'=>array( 'path'=>'upload/importCsv/', // path to folder for saving csv file and file with import params ), ...... ),
-
Create a directory which you use in 'path'. Do not forget to set access permissions for directory 'path';
-
The module is available here:
Or here:
http://yourproject/index.php?r=importcsv.
Or somewhere else:-) It depends from path settings in your project;
- ATTENTION! The first row of your csv-file must will be a row with column names.