My PHP Program is look like this one, the problem is spesified MIME type cannot open OOCalc directly, but always triggering OOWriter to run. In MS Windows environment I can opening MS Excel directly with the excel mime type.
<?php
header("Pragma: public");
header("Cache-control: private");
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header("Expires: Tue, 1 Jan 1980 12:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header('Connection: close');
header("Pragma: no-cache");
header("Expires: 0");
// header("Content-Type: application/vnd.ms-excel");
// header("Content-Type: application/vnd.oasis.opendocument.spreadsheet");
header("Content-Type: application/vnd.sun.xml.calc");
$strHtml = "
<TABLE WIDTH=530 BORDER=1 CELLPADDING=4 CELLSPACING=3 STYLE='page-break-before: always; page-break-inside: avoid'>
<COL WIDTH=56>
<COL WIDTH=288>
<COL WIDTH=56>
<COL WIDTH=81>
<THEAD>
<TR VALIGN=TOP>
<TH WIDTH=56>
<P>No</P>
</TH>
<TH WIDTH=288>
<P>Item</P>
</TH>
<TH WIDTH=56>
<P>Vol</P>
</TH>
<TH WIDTH=81>
<P>Price</P>
</TH>
</TR>
</THEAD>
<TBODY>
<TR VALIGN=TOP>
<TD WIDTH=56>
<P>1</P>
</TD>
<TD WIDTH=288>
<P>Item No 1</P>
</TD>
<TD WIDTH=56>
<P ALIGN=CENTER>1</P>
</TD>
<TD WIDTH=81>
<P ALIGN=RIGHT>$10</P>
</TD>
</TR>
<TR VALIGN=TOP>
<TD WIDTH=56>
<P>2</P>
</TD>
<TD WIDTH=288>
<P>Item No 2</P>
</TD>
<TD WIDTH=56>
<P ALIGN=CENTER>1</P>
</TD>
<TD WIDTH=81>
<P ALIGN=RIGHT>$20</P>
</TD>
</TR>
</TBODY>
</TABLE>";
echo $strHtml;
?>