Wrox Programmer Forums
|
BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8
This is the forum to discuss the Wrox book Professional CodeIgniter by Thomas Myer; ISBN: 9780470282458
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 1st, 2009, 07:07 AM
Authorized User
 
Join Date: Nov 2009
Posts: 26
Thanks: 3
Thanked 0 Times in 0 Posts
Default CSV export problem

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

e.g.
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.

Regards.
 
Old November 1st, 2009, 07:45 AM
Authorized User
 
Join Date: Nov 2009
Posts: 26
Thanks: 3
Thanked 0 Times in 0 Posts
Smile Ok, I solved the problem

I forgot to select comma when I import to excel.

http://www.brighthub.com/computing/w...les/10782.aspx

 
Old September 4th, 2012, 06:08 PM
Registered User
 
Join Date: Sep 2012
Posts: 9
Thanks: 0
Thanked 3 Times in 3 Posts
Default Fatal Error in Export CSV

I'm getting this error when I click on the Category link:
Code:
( ! ) Fatal error: Cannot redeclare MCats::exportCsv() in C:\wamp\www\ci_fullsite_professional\application\models\mcats.php on line 183
Model - MCats:
Code:
function exportCsv(){
	$this->load->dbutil();
	$Q = $this->db->query("select * from categories");
	return $this->dbutil->csv_from_result($Q,",","\n");
}
Admin Controller - Categories:
Code:
function export(){
	$this->load->helper('download');
	$csv = $this->MCats->exportCsv();
	$name = "category_export.csv";
	force_download($name,$csv);
}
CI version 2.1.2





Similar Threads
Thread Thread Starter Forum Replies Last Post
DataSet export to .csv file snufse1 ASP.NET 2.0 Basics 3 September 22nd, 2008 07:22 AM
Csv Export Coby Access VBA 4 July 25th, 2007 08:19 AM
Export To .csv File paul31Hampshire Access VBA 18 June 26th, 2006 11:30 AM
More Export.csv mayhem Morris Access 1 February 24th, 2004 12:52 PM
Export csv grahampinkney Access 3 February 21st, 2004 07:35 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.