您好,欢迎访问一九零五行业门户网

php 能否查询excel表?

使用php语言,能否把excel当成是table表那样进行查询,获取数据?
回复内容: 使用php语言,能否把excel当成是table表那样进行查询,获取数据?
phpexcel
https://github.com/ouardisoft/osexcelbundle
用法:
读取excel service
$excel = $this->get('os.excel');
打开excel
$excel->loadfile([file_pathname]);
选择sheet
$excel->setactivesheet([index_of_sheet]);
sheet数
$excel->getsheetcount();
sheet名
$excel->getsheetnames();
读取行数
$excel->getrowcount();
读取字段数
$excel->getcolumncount();
最后一个字段的索引
$excel->gethighestcolumn();
行数据
$excel->getrowdata([index_of_row]);
单元格数据
$excel->getcelldata([index_of_row], [index_of_column]);
把excel数据读取为php数组
$excel->getsheetdata();
handle excel 的问题我推荐这个插件: phpexcel
你指的查询是怎么样查询呢?由行列信息得值还是?
其它类似信息

推荐信息