RE: [PHP] PHP to Excel, Quick Question, DONE

From: Date: Fri, 03 May 2002 18:05:11 +0000
Subject: RE: [PHP] PHP to Excel, Quick Question, DONE
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-95945@lists.php.net to get a copy of this message
[snip] SUM(IF(If FOO is this, return this number, else return a blank)) that looks like this really SUM(IF(RecordID = '100101', 1, '')) as min1 Which works correctly BUT, if the statement is false it does not show a blank cell in the worksheet, but a "0" (zero). I have tried stuff, 1, '\'' (escape a tick which Excel normally uses to display numbers as text) stuff, 1, ' ' (a space) stuff, 1, NULL (which still returns a zero) stuff, 1, (which throws errors) stuff, 1, '\"\"' (which still returns a zero) stuff, 1, '\ ' (escape a space) The worksheet still has zero values displayed, no matter what I do (except for that which throws errors). Ideas? [/snip] I got it (and feel somewhat a d'oh!). I just ley PHP handle it when it writes it out; if($dbrow->min1 > 0){ print($dbrow->min1); } for each row... Jay

« previous php.general (#95945) next »