p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/)
-   BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8 (http://p2p.wrox.com/book-professional-codeigniter-isbn-978-0-470-28245-8-414/)
-   -   CSV export problem (http://p2p.wrox.com/book-professional-codeigniter-isbn-978-0-470-28245-8/76844-csv-export-problem.html)

phpcoder101 November 1st, 2009 07:07 AM

CSV export problem
When I export csv file for products and categories, a row of each data in csv is in one cell.

id,"name","shortdesc","longdesc","thumbnail","imag e","grouping","status","category_id","featured" ,

is in one cell.

Could anyone tell me how to fix this problem?

I open csv with MS Exel.


phpcoder101 November 1st, 2009 07:45 AM

Ok, I solved the problem
I forgot to select comma when I import to excel.



plavalle September 4th, 2012 07:08 PM

Fatal Error in Export CSV
I'm getting this error when I click on the Category link:

( ! ) Fatal error: Cannot redeclare MCats::exportCsv() in C:\wamp\www\ci_fullsite_professional\application\models\mcats.php on line 183
Model - MCats:

function exportCsv(){
        $Q = $this->db->query("select * from categories");
        return $this->dbutil->csv_from_result($Q,",","\n");

Admin Controller - Categories:

function export(){
        $csv = $this->MCats->exportCsv();
        $name = "category_export.csv";

CI version 2.1.2

All times are GMT -4. The time now is 06:34 AM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
2013 John Wiley & Sons, Inc.