AppServNetwork

2013 年 6 月 21 日3210

PHP Language

Everybody knows phpMyAdmin can export file to Excel format butphpMyAdmin just export .csv file,not real Excel file format. If you are interest in PHP programming and need to export to therealExcel format please check it out !

Example PHP export to XLS file format.

1.Create Functionfor XLS

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;

}

(Read More... | 15906 bytes more | Score: 4.76)

0 0