Php-excel-reader condition query

Source: Internet
Author: User
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]. '';
}
}
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.