tom rider SLO
Član broj: 2635 Poruke: 15 193.189.186.*
|
Ok leka, onda probaj sa time:
<?php
// Excel begin of file header
function xlsBOF() {
echo pack("ssssss", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0);
return;
}
// Excel end of file footer
function xlsEOF() {
echo pack("ss", 0x0A, 0x00);
return;
}
// Function to write a Number (double) into Row, Col
function xlsWriteNumber($Row, $Col, $Value) {
echo pack("sssss", 0x203, 14, $Row, $Col, 0x0);
echo pack("d", $Value);
return;
}
// Function to write a label (text) into Row, Col
function xlsWriteLabel($Row, $Col, $Value ) {
$L = strlen($Value);
echo pack("ssssss", 0x204, 8 + $L, $Row, $Col, 0x0, $L);
echo $Value;
return;
}
Header ("Content-type: application/vnd.ms-excel; name='My_Excel'");
header ("Content-Disposition: attachment; filename=test.xls" );
header ("Content-Description: PHP Generated Data" );
flush;
xlsBOF(); // begin Excel stream
xlsWriteLabel(0,0,"Vsem lep pozdrav");//Text- A1
xlsWriteLabel(1,0,"Tom rider"); //Text- A2
xlsWriteNumber(0,1,0123456789); // Number B1
xlsWriteNumber(3,6,0123456789); // Number G4
xlsEOF(); // close the stream
?>
Tom rider
|