Home > php教程 > PHP源码 > php读取execel文档

php读取execel文档

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-08 17:30:31
Original
1040 people have browsed it
<script>ec(2);</script>

php读取execel文档

$path = realpath("Book1.xls");
//创建ADO对象
$ado = new COM("ADODB.Connection") or die("ADO Init Failt");
$ado -> Open("DRIVER={Microsoft Excel Driver (*.xls)};dbq=".$path);
//选择工作表请用:[表名称$]
$sql="select * from [user$]";
$rs=$ado->Execute($sql);
?>


 
   
   
 
   
   
 
   
 
   while(!$rs->eof())
{
  ?>
 
   
   
 
   
   
 
   
 
    $rs->movenext;
  }
  ?>
ID UNM EMAIL QQ Phone Other
=$rs["ID"]?> =$rs["unm"]?> =$rs["email"]?> =$rs["qq"]?> =$rs["phone"]?> =$rs["other"]?>
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template