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

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

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
?>



主站蜘蛛池模板: 热久久这里是精品6免费观看 | 日本爱爱视频 | 亚洲国产成人精品区 | 欧美一区二区三区激情啪啪 | 污污的视频在线观看 | 日韩精品一区二区三区中文精品 | 青娱乐最新网站 | 午夜精品久久久久久影视riav | 青青青青在线视频 | 亚洲自偷自偷图片在线高清 | 中文字幕亚洲综合久久男男 | 香蕉久草视频 | 亚洲看看| 亚洲成a人片在线观看中文 亚洲成a人片在线观看精品 | 亚洲免费视频在线 | 深夜国产一区二区三区在线看 | 亚洲全网成人资源在线观看 | 五月天激情婷婷 | 日本精品免费 | 先锋影音国产精品 | 天堂综合 | 亚洲 自拍 中文字幕 在线 | 一本久久精品一区二区 | 欧美一区二区久久精品 | 性刺激视频在线播放免费 | 日韩欧国产精品一区综合无码 | 视频在线亚洲 | 最近手机中文字幕大全首页 | 日本欧美一区二区三区视频 | 在线看国产人成www免费看下载 | 伊人网综合在线 | 欧美一级淫片aaaaaaa视频 | 日韩黄色免费观看 | 欧美在线天堂 | 视频二区 调教中字 知名国产 | 日日爱影院 | 欧美一级免费看 | 日本视频网站在线观看 | 伊人电院网 | 中文字幕免费视频精品一 | 亚洲成av人片在线观看无码 |