setCellValueByColumnAndRow() can't write up to 1000 rows

I'm trying to use PHPExcel to export a data with 1000 rows(the data is from a sql table) to MS excel 2003. However, it occured an error.
i used the same code to export a data with less data(<100 rows), it works fine.
I'm using php5 with IIS server.I've also set the MaxExecuteTime to -1 but the problem still there.