phpexcel
来源:互联网 发布:中国网络日报T大漠鱼T 编辑:程序博客网 时间:2024/06/06 06:57
读取文件private function import($filepath){ $this->ci->load->library('PHPExcel'); $PHPReader = new PHPExcel_Reader_Excel5(); $PHPExcel = $PHPReader->load($filepath); /**读取excel文件中的第一个工作表*/ $currentSheet = $PHPExcel->getSheet(0); /**取得最大的列号*/ $allColumn = $currentSheet->getHighestColumn(); /**取得一共有多少行*/ $allRow = $currentSheet->getHighestRow(); /**从第二行开始输出,因为excel表中第一行为列名*/ for($currentRow = 2;$currentRow <= $allRow;$currentRow++) { /**ord()将字符转为十进制数*/ $valA= $currentSheet->getCellByColumnAndRow(ord('A') - 65,$currentRow)->getValue(); $valB = $currentSheet->getCellByColumnAndRow(ord('B') - 65,$currentRow)->getValue(); $valC = $currentSheet->getCellByColumnAndRow(ord('C') - 65,$currentRow)->getValue(); // 新增 action code... }}
阅读全文
0 0
- phpexcel
- phpexcel
- phpexcel
- PHPExcel
- PHPExcel
- PHPexcel
- PHPEXCEL
- phpexcel
- phpexcel
- phpexcel
- phpexcel
- phpexcel
- PHPexcel
- phpExcel
- PHPExcel
- PHPExcel
- PHPExcel
- PHPExcel
- ${pageContext.request.contextPath} JSP取得绝对路径
- mysql match against 全文搜索
- 【Android】sweetDialog 看着都是甜的
- FZU2275KMP(字符串匹配)
- 【传智播客郑州校区分享】eclipse(或者STS)+git+码云的结合使用
- phpexcel
- Lua笔记-关于lua table的C API
- java序列流的简单使用
- 亿级下ApsaraDB HBase Phoenix秒级内RT在大搜车实践
- arcgis直连oracle数据库
- 接口 interface implements
- 嵌入式系统软件开发环境
- 【转】Tomcat启用HTTPS协议配置过程
- js自执行函数(function(){})()前加个分号是什么意思?