PHPExcel developer documentation

Make sure that your script is saved without a BOM (Byte-order mark). (Because this counts as echoing output) Same things apply to all included files. Failing to follow the above guidelines may result in corrupt Excel files arriving at the client browser, and/or that headers cannot be set by … ................
................