I have no idea how to use Excel Extended Format. I'm trying to add '%' or red color(when data is belong zero).
Using those scripts :
function xlsBOF() {
echo pack("ssssss", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0);
return;
}
function xlsEOF() {
echo pack("ss", 0x0A, 0x00);
return;
}
function xlsWriteNumber($Row, $Col, $Value) {
echo pack("sssss", 0x203, 14, $Row, $Col, 0x0);
echo pack("d", $Value);
return;
}
function xlsWriteLabel($Row, $Col, $Value ) {
$L = strlen($Value);
echo pack("ssssss", 0x204, 8 + $L, $Row, $Col, 0x0, $L);
echo $Value;
return;
}
xlsBOF();
xlsWriteLabel(1,1,'Smth');
$val = -12,23;
/* This number should be exported red with %,
i think i have to use this '0,00%;[RED]-0,00%' but no idea how
*/
xlsWriteNumber(2,1,$val);
xlsEOF();
exit();
Thanks in advance.