----------------------------
Excel Functions
----------------------------
將下面的代碼存為excel.php ,然后在頁面中包括進來

然后調用
1. Call xlsBOF()
" /> 久久免费国产,色愁愁久久久,国产网站免费观看

天天躁日日躁狠狠躁AV麻豆-天天躁人人躁人人躁狂躁-天天澡夜夜澡人人澡-天天影视香色欲综合网-国产成人女人在线视频观看-国产成人女人视频在线观看

php生成EXCEL的東東

可以通過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
?>

php技術php生成EXCEL的東東,轉載需保留來源!

鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯系我們修改或刪除,多謝。

主站蜘蛛池模板: 韩剧甜性涩爱 | 美女视频黄a视频全免费网站色窝 | 老太婆风流特黄一级 | jizz日本美女 | 美女扒开尿口直播 | 公粗挺进了我的密道在线播放贝壳 | 国产在线亚洲v天堂a | 99亚洲精品色情无码久久 | 国产久久精品热99看 | AV无码国产精品午夜A片麻豆 | 男女XX00上下抽搐动态图 | 11 13加污女qq看他下面 | 羽月希被黑人吃奶dasd585 | 妻子的秘密HD观看 | 精品午夜中文字幕熟女人妻在线 | 一个人在线观看免费中文www | 国产精品无码亚洲精品 | 国产精品内射久久久久欢欢 | 国语自产偷成人精品视频 | 暖暖 视频 在线 观看 高清 | 亚洲国产精品第一影院在线观看 | 中文无码第3页不卡av | 国产成A人片在线观看 | 在线亚洲专区中文字幕 | 日本污ww视频网站 | 婷婷五月久久丁香国产综合 | 久久本道久久综合伊人 | 久久中文字幕无码A片不卡 久久中文字幕人妻熟AV女蜜柚M | 中文无码字慕在线观看 | 欧美性黑吊xxx | 久久re6热在线视频精品66 | 久久久青青 | 办公室丝袜老师在线观看 | 妺妺窝人体色777777野大粗 | 国产午夜精品一区二区理论影院 | 国产亚洲tv在线观看 | 男人插曲女人的视频 | 国内精品乱码卡一卡2卡三卡 | 女人的选择hd | 欧美黄色第一页 | 成人在无码AV在线观看一 |