How does Spreadsheet_Excel_Reader read the specified workbook in excel?
$data = new Spreadsheet_Excel_Reader();$data->setOutputEncoding('gbk');$data->read('abc.xls'); echo $data->sheets[0]['cells'][1][1];
Sheets [0] indicates the first workbook. if you want to read data in the first row and column of a workbook named water in excel, how can you write the code?
Reply to discussion (solution)
Traverse the sheet and retrieve the key value of the sheet with title = water.
I have forgotten php four years ago. can I give the code directly?
You have never used this. maybe you can put it on a cloud disk.
Have you ever done this? Give code
After studying the sheet table in the afternoon, we traverse the sheet table according to forain2012. we can specify the table and we don't know whether there is any simple method.
Require_once 'phpexcelreader/Excel/reader. php '; $ data = new Spreadsheet_Excel_Reader (); $ data-> setOutputEncoding ('gbk'); $ data-> read('hangzhou.xls'); $ sheet_name = 'watermark '; for ($ sheet = 0; $ sheet
Sheets); $ sheet ++) {if ($ data-> boundsheets [$ sheet] ['name'] ==$ sheet_name) {break ;}} echo $ data-> sheets [$ sheet] ['cells '] [1] [1];