Php-excel-reader condition query php-excel-reader
I want to query, in excel, the data record of column A (that is, the employee ID) that is equal to tester...
Reply to discussion (solution)
// The data in the table test.xls is as follows:
// Specify the employee ID, which is the first row and the second row of tester.
Employee ID, basic salary, real salary, total
Tester test 11 222 333
Tester2 test2 22 333 555
Check whether the value is tester from A2, B1, C1.... (assuming the behavior r is found)
Remove from Ar, Br, Cr... until the end of the valid column
Now, I have thought of a solution. I still use the if condition to judge.
For ($ I = 1; $ I <= $ data-> sheets [0] ['numrows ']; $ I ++ ){
If ($ data-> sheets [0] ['cells '] [$ I] [1] = 1114 ){
For ($ j = 1; $ j <= $ data-> sheets [0] ['numcols']; $ j ++ ){
Echo $ data-> sheets [0] ['cells '] [$ I] [$ j]. '';
}
}
}