Tuning Phpexcel

I am using the PHPExcel module to dump CGridView to a CSV or Excel file.

I am also having a big problem.

A simple export to CSV or EXCEL format (2007 in particular) It uses 128M and blows up!

The data was 1000 rows of 15-20 columns (no big text fields).

Any more than 50 rows causes a memory error.

Is there is a way to tune phpexcel?

Is the Yii Data Model extract inefficient or is it the actual writing of the excel file? Why would CSV have the same problem?

I think I also had a timeout error in transfering the data to the client, but not sure.

Anyone with experience in how to tune this?

Thanks in Advance !