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

然后調(diào)用
1. Call xlsBOF()
" /> 日韩免费av一区二区,亚洲激情视频在线观看,亚洲福利一区

中文字幕日韩一区二区_国产一区二区av_国产毛片av_久久久久国产一区_色婷婷电影_国产一区二区精品

php生成EXCEL的東東

可以通過php來產(chǎn)生EXCEL檔.  teaman翻譯
----------------------------
Excel Functions
----------------------------
將下面的代碼存為excel.php ,然后在頁面中包括進(jìn)來

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

也可以用 fwrite 函數(shù)直接寫到服務(wù)器上,而不是用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技術(shù)php生成EXCEL的東東,轉(zhuǎn)載需保留來源!

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

主站蜘蛛池模板: 欧美一区二区在线观看 | 99re66在线观看精品热 | 国产电影一区二区在线观看 | 日韩精品一区在线 | 欧美日韩亚 | 成人精品国产一区二区4080 | 精品久久一区 | 国产高清久久 | 久久99精品久久久久久狂牛 | 天天操天天拍 | 欧美视频第二页 | 91久久精品一区二区二区 | 中文在线播放 | 欧美高清性xxxxhd | 日韩久久久久久 | 一区二区成人 | 天天操综合网 | 日韩不卡视频在线观看 | 男人天堂av网 | 国产内谢 | 欧美日韩不卡合集视频 | 色综网 | 久久性 | 精品国产一区二区三区免费 | 国产激情福利 | 在线观看久草 | 国产精品视频一区二区三区 | 中文字幕一级 | 久久一区二区视频 | 久久99精品国产麻豆婷婷 | 蜜臀网站 | 久久夜色精品国产 | 免费一区| 欧美一级做a爰片免费视频 国产美女特级嫩嫩嫩bbb片 | 在线看亚洲 | 成人在线免费网站 | 精品国产一区二区三区久久影院 | 一区二区三区视频免费看 | 性网址| 狠狠的干 | 日韩欧美在线免费观看视频 |