I have created a simple script using PHP header by which I am creating excel document which is working fine for MS Excel in windows and MAC OS.
below is the code
<?php
$Timestamp = date("d-m-Y");
header('Content-type: application/excel');
header('Content-Disposition: attachment; filename="Estimates-'.$Timestamp.'.xls"');
<table class="table" width="800px">
<tr>
<th style="background-color: #666666; color:#ffffff; width:690px" align="left">Names</th>
<th style="background-color: #666666; color:#ffffff; width:110px" >Bonus Amount</th>
</tr>
<tbody>
<tr>
<td >Praveen Solanki</td>
<td >45000</td>
</tr>
<tr>
<td >Pramit Solanki</td>
<td >30000</td>
</tr>
<tr>
<td >Ashish Surawanshi</td>
<td >30000</td>
</tr>
</tbody>
</table>
But when i open the same file in MAC machine using "NUMBERS" application, it is showing me my above html code. Because "NUMBERS" doesnt support this formatting which i found by R&D.
But now the question is how can i create the excel file which should work on NUMBERS plus MS EXCEL. As in my search i also found that the default document which i am creating directly form the MS Excel is currently opening on NUMBERS.
Looking for the correct path/code by which i can create the excel file.