六月婷婷综合激情-六月婷婷综合-六月婷婷在线观看-六月婷婷在线-亚洲黄色在线网站-亚洲黄色在线观看网站

明輝手游網中心:是一個免費提供流行視頻軟件教程、在線學習分享的學習平臺!

php生成EXCEL的東東

[摘要]可以通過PHP來產生EXCEL檔. teaman翻譯 ---------------------------- Excel Functions ---------------------------- 將下面的代碼存為excel.php ,然后在頁面中包括進來 然后調用 1. Call ...
可以通過PHP來產生EXCEL檔.  teaman翻譯
----------------------------
Excel Functions
----------------------------
將下面的代碼存為excel.php ,然后在頁面中包括進來

然后調用
1. Call xlsBOF()  
2. 將一些內容寫入到xlswritenunber() 或者 xlswritelabel()中.
3.然后調用 Call xlsEOF()

也可以用 fwrite 函數直接寫到服務器上,而不是用echo 僅僅在瀏覽器上顯示。
   


<?php
// ----- begin of function library -----
// 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;
}
// ----- end of function library -----
?>

//  
// To display the contents directly in a MIME compatible browser  
// add the following lines on TOP of your PHP file:

<?php
header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header ("Last-Modified: " . gmdate("D,d M YH:i:s") . " GMT");
header ("Cache-Control: no-cache, must-revalidate");     
header ("Pragma: no-cache");     
header ('Content-type: application/x-msexcel');
header ("Content-Disposition: attachment; filename=EmplList.xls" );  
header ("Content-Description: PHP/INTERBASE Generated Data" );
//
// the next lines demonstrate the generation of the Excel stream
//
xlsBOF();   // begin Excel stream
xlsWriteLabel(0,0,"This is a label");  // write a label in A1, use for dates too
xlsWriteNumber(0,1,9999);  // write a number B1
xlsEOF(); // close the stream
?>



主站蜘蛛池模板: 天堂色在线 | 亚洲国产成人影院播放 | 中国性欧美 | 午夜影院在线观看 | 亚洲s色大片在线观看下载 亚洲s色 | 天天干天天舔天天操 | 伊人中文字幕在线观看 | 亚洲天堂男人 | 色噜噜狠狠成人网 | 日韩欧美亚洲综合久久影院d3 | 午夜一级精品免费毛片 | 亚洲欧洲免费视频 | 日本无人区码卡1 | 午夜岛国 | 婷婷伊人久久 | 在线九色| 无人区国产大片 | 色综合欧美色综合七久久 | 亚洲第一中文字幕 | 欧美在线观看a | 日本福利视频一区 | 性8成人有声小说在线播放 性 色 黄 一级 | 亚洲九九香蕉 | 自拍三区 | 亚洲欧洲一区二区三区在线 | 伊人精品久久久大香线蕉99 | 午夜视频免费 成人 | 日韩精品一区二区三区大桥未久 | 亚洲欧美香蕉在线日韩精选 | 午夜免费观看_视频在线观看 | 欧美在线高清视频播放免费 | 天堂资源在线 | 欧美又粗又大又硬又长又爽视频 | 午夜影院免费视频 | 欧美一线高本道高清在线 | 校园激情综合网 | 中文字幕在线视频在线看 | 青青青免费观看在线视频高清 | 天天狠天天透天干天天怕处 | 日本三级成人中文字幕乱码 | 日本免费网站视频 |