Revision #4 has been created by bluyell on Jan 22, 2013, 6:16:36 AM with the memo:
« previous (#3)
simple CSV export
csv, excel, export
Hello everyone, this simple component extract data to CSV. The main difference with others is the ability to format each column using Yii::app()->format functions in a very similar way as CGridView does.
1. **This component can output the result directly to your browser as a downloadble CSV**, so use the input arguments to provide a filename, if not, the output will be returned as a string.
2. **The input argument to be converted to CSV must be any array of CModel objects**, or any indexed array like $ar['key1'],$ar['key2']. You can pass an CActiveRecord array to this component too.