简体   繁体   English

PHP Excel阅读器(excel_reader2.php)

[英]PHP Excel Reader (excel_reader2.php)

Is it possible to search a certain value inside the spreadsheet using excel_reader2 and get row number so I can get the entire row value using that? 是否可以使用excel_reader2在电子表格中搜索某个值并获取行号,以便我可以使用该值获取整个行值? Trying to save myself from dumping the data into database, since all I want is to displaying values. 试图避免将数据转储到数据库中,因为我想要的只是显示值。 And yes I know I can do data->dump, but I need a single row values based on login. 是的,我知道我可以执行data-> dump,但是我需要基于登录的单行值。

Thanks in advance. 提前致谢。

Have you tried this: 您是否尝试过:

$data = new Spreadsheet_Excel_Reader("test.xls",false);
$data->val($row,$col,$sheet_index)                     //$data->val(10,A);

You can go through all rows and cols with foreach loop and find a "column and row" with word using regexp function. 您可以使用foreach循环遍历所有行和列,并使用regexp函数查找带有单词的“列和行”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM