How does Spreadsheet_excel_reader read the workbook specified by Excel?

Source: Internet
Author: User
$data = new Spreadsheet_excel_reader (); $data->setoutputencoding (' GBK '); $data->read (' Abc.xls '); echo $data->sheets[0][' cells '][1][1];


Sheets[0] Represents the first workbook, if you specify to read the first row of a workbook called water in Excel, the first column of data, how to write the code?


Reply to discussion (solution)

Traverse Sheet The key value of the sheet with title = water

4 years ago Get PHP, basically forget, can you directly to the code?

You're not using this stuff, maybe you can put him on the cloud.

Did you get one of them? Give a code

The study of the afternoon, according to Forain2012 said to traverse the sheet table, you can specify to indicate, do not know if there is any simple method.

Require_once ' phpexcelreader/excel/reader.php '; $data =new spreadsheet_excel_reader (); $data->setoutputencoding ( ' GBK '); $data->read (' property. xls '); $sheet _name= ' drainage '; for ($sheet =0; $sheet
 
  
   
  sheets); $sheet + +) {if ($data->boundsheets[$sheet] [' Name ']== $sheet _name) {break;}} echo $data->sheets[$sheet [' cells '][1][1];
 
  
  • 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.