View Full Version : excel display problem for different version of microsoft office.

07-19-2007, 06:12 PM
Dear All,

i had developed an export data to excel function, but they have some problem with cross version of Microsoft office.
How can i display the integer as string in excel (without any setting, with default setting)?
isn't all version of office support same ascii code?

this my coding:
header("Content-type: application/x-msexcel");
header("Content-Disposition: attachment; filename=\"frtInvSummaryReport_".date('dmY').".xls\"");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0,pre-check=0");
header("Pragma: public");

$SEPARATOR = "\t";


//some process here

echo $header;
echo $title;
echo $content;

I m using PHP to export the data to excel file.
With this function, i able to generate a excel file but it were some display problem in the excel file for different version of office. For example, it will auto reduce the '0(zero)' after the ".(dot)". This one of things i don't want.

to solve the problem upper, i add in new space with ascii code (chr(255)) but problem is, it not support by old version (97/2000) office.
It display other character on old version but display empty space at new version (2003)


EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum