Maison >développement back-end >tutoriel php > phpexcel导出文件格式求解,该怎么处理
phpexcel导出文件格式求解
http://zhidao.baidu.com/question/515423304.html?oldq=1 谢谢
<br /> <?php<br /> $sql="select * from record where officecode='$officecode' and searchtime like '%$riqi%' order by name limit $offset,$Page_size" ;<br /> $result=mysql_query($sql,$link);<br /> $last=array();<br /> while($row=mysql_fetch_array($result)){<br /> if($last){<br /> $row['xingshi'] = (strtotime($row['arrivetime'])-strtotime($last['gotime']))/60;<br /> if($row['name'] == $last['name']) { //还是同一组<br /> $distance += $row['distance']; //计算合计距离<br /> $xingshi += $row['xingshi']; //计算行驶时间<br /> }<br /> else { <br /> //当组别变化时,行驶时间为0<br /> $row['xingshi'] = 0;<br /> ?><br /> <td colspan="4" bgcolor="#E0EEE">合计</td><br /> <td><div align="center"> <br /> <?php echo $distance."km"; ?> <br /> </div></td><br /> <td><?php echo $xingshi."min"; ?></td><br /> <?php<br /> //合计完成后,重置行驶距离和行驶时间<br /> $distance = $row['distance'];<br /> $xingshi = 0;<br /> }<br /> }<br /> else {<br /> //每个name第一次进入时的行驶距离和时间<br /> $distance = $row['distance'];<br /> $xingshi = 0;<br /> }<br /> $last=$row; <br /> ?><br />