You're not really generating an Excel file. You're generating what amounts to a .csv file using tabs as the seperator.
To generate a 'real' Excel file, use PHPExcel.