简体   繁体   中英

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? 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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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