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

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

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



主站蜘蛛池模板: 欧美婷婷色 | 午夜影视体验区 | 中文学幕专区 | 青青青爽在线视频免费观看 | 欧美性美 | 亚洲18av| 天天做天天操 | 午夜免费啪视频观看网站 | 欧美一级看片a免费观看 | 午夜精品视频在线观看 | 亚洲精品免费在线观看 | 日韩 欧美 中文 亚洲 高清 在线 | 速度与激情9完整版免费观看 | 亚洲 欧美 国产另类首页 | 日本免费不卡在线一区二区三区 | 污在线观看视频 | 午夜性福 | 天天操天天操天天射 | 一级女性全黄久久生活片 | 亚洲网站在线 | 午夜在线观看视频 | 日韩一区二区三区四区不卡 | 日韩中文字幕在线有码视频网 | 伊人资源| 亚洲免费观看 | 伊人狠狠色丁香婷婷综合下载 | 亚洲第9页 | 青青青青青视频免费播放 | 一本之道久久 | 日本国产免费一区不卡在线 | 在线观看精品视频一区二区 | 中文字幕在线看视频一区二区三区 | 亚洲第一中文 | 亚洲欧美日韩精品一区 | 色天天天天 | 人人色在线视频播放 | 欧美天天性影院 | 一本一道波多野结衣一区二区 | 伊人久久综合影院首页 | 日本www色视频 | 日韩欧美国产亚洲 |