I've been looking long and hard, and haven't really found a simple way to do this except: $file="test.xls"; header("Content-Type: application/vnd.ms-excel"); header("Content-Disposition: attachment;filename=".$file ); header('Pragma: no-cache'); header('Expires: 0');