phpExcelReader realize Excel Analysis

sponsored links
I. Introduction

PHP-ExcelReader Excel xsl file is a read the contents of a PHP class.

It's download site: http://sourceforge.net/projects/phpexcelreader/

File Name: phpExcelReader.zip

Contains two essential files: oleread.inc, reader.php. Other file is an application example, the readme files, etc.

Second, document use

First of all, including reader class file: require_once "reader.php";

Create a new instance of: $ xl_reader = new Spreadsheet_Excel_Reader ();

Read Excel file information: $ xl_reader-> read ("filename.xls");

It will export the Excel file can identify all of the data stored in an object. Data is stored in two arrays, there is no available method / function to access the data. Can be as simple as following the use of an array name.

sheets to read into the object array contains large amounts of data. It will export the Excel file can identify all of the data stored in a 2-dimensional array $ xl_reader-> sheets [x] [y]. table for the document x Number, y is one of the following parameters:

l numRows - int - the number of rows the table

For example: $ rows = $ xl_reader-> sheets [0] ['numRows']

l numCols - int - the number of columns the table

For example: $ cols = $ xl_reader-> sheets [0] ['numCols']

l cells - array - the actual content of the table. A [row] [column] format of 2-dimensional array

For example: $ cell_2_4 = $ xl_reader-> sheets [0] ['cells'] [2] [4] / / row 2, column 4 data

l cellsInfo - array - a table of information of different data types. Each of which contains a table of raw data and type. This array contains two parts: raw - raw data form; type - data type.

Note: Only non-text data.

For example: $ cell_info = $ xl_reader [0] ['cellsInfo'] [2] [4]

$ Cell_info ['raw'] is the raw data from the cell

$ Cell_info ['type'] is the data type

$ Xl_reader-> sheets array example:

Array

(

[0] => Array

(

[Maxrow] => 0

[Maxcol] => 0

[NumRows] => 30

[NumCols] => 12

[Cells] => Array

(

[1] => Array

(

[1] => Date

[2] => Donor / Title

[3] => amount

[4] => the original donation amount

[5] => Receipt No.

[6] => receipts rise

[7] => Sex

[8] => use

[9] => address

[10] => Contact / Phone

[11] => implementation of the case

[12] => Notes

)

[2] => Array

(

[1] => 2007/06/02

[2] => Rong-Hua Qin Wei Qinglian / Group

[3] => 300000

[4] => 45

[5] => 502

[6] => Ningbo Accor Machinery Co., Ltd. China

[7] => couples

[8] => test

[10] => Hu Aihua Secretary / 13566518117

[11] => 2008-9 love 2008-12 school 1 250 000 1 250 000 primary school love pearl 2009-9 Class 2 Class Balance 250,000 750,000 yuan

[12] => Notes

)

)

[CellsInfo] => Array

(

[2] => Array

(

[1] => Array

(

[Raw] => 1180742400

[Type] => date

)

[3] => Array

(

[Raw] => 300000

[Type] => number

)

[4] => Array

(

[Raw] => 45

[Type] => unknown

)

[5] => Array

(

[Raw] => 502

[Type] => unknown

)

)

)

)

[1] => Array

(

[Maxrow] => 0

[Maxcol] => 0

[NumRows] => 0

[NumCols] => 0

)

[2] => Array

(

[Maxrow] => 0

[Maxcol] => 0

[NumRows] => 0

[NumCols] => 0

)

)

boundsheets array contains objects of other information, an array indexed by workbook. The second index name: $ xl_reader-> boundsheets [i] ['name'] returns the first name of the table i tables

For example: $ sheetname = $ xl_reader-> boundsheets [0] ['name']; / / name of the first sheet

$ Xl_reader-> boundsheets array example:

Array

(

[0] => Array

(

[Name] => Sheet1

[Offset] => 3054

)

[1] => Array

(

[Name] => Sheet2

[Offset] => 6147

)

[2] => Array

(

[Name] => Sheet3

[Offset] => 6410

)

)

PHP-ExcelReader only support BIFF7, BIFF8 format. Including Excel95 to Excel2003. But does not include Excel5.0 and prior versions. In fact Excel XP and Excel 2003 use BIFF8X BIFF8 format is an extension. All added features may not be PHP-ExcelReader. Lock support. Otherwise, it can only run Excel XP/2003 files.
  • del.icio.us
  • StumbleUpon
  • Digg
  • TwitThis
  • Mixx
  • Technorati
  • Facebook
  • NewsVine
  • Reddit
  • Google
  • LinkedIn
  • YahooMyWeb

Related Posts of phpExcelReader realize Excel Analysis

  • Ruby Rails system calls the use of Ping

    Want to use call system commands under RoR, the general exec and system and the syscall Want to use in Rails, the call ping command The most common are ruby support Ping usage is as follows: Ping contains routines to test for the reachability of remote ho

  • The use of Ajax-bridge

    Administrative divisions in the choice of the function of the tree to use the ajax-bridge, Flex part can have a Tree Choose administrative divisions, after the completion of selection AJAX to refresh the page of data; AJAX pop-up page one and another ...

  • js form validation Guinness

    js form validation Guinness 1. Length <script> function test () ( if (document.abvalue.length> 50) ( alert ( "Can not more than 50 characters!"); document.abfocus (); return false; ) ) </ script> <form name=a onsubmit="ret

  • SUI-JavaScript rich UI library integration solution

    Introduction: SUI is not a class implementation of the UI, nor is it a standard set of UI markup language, it is just to help the existing UI frameworks (such as Ext, YUI like) to mark the way to the statement and the creation of UI. The names of these ta

  • I heard good Ruby and Rails site

    1. Ruby Inside is said to be the best news station, the subscriber number 16xxx [img] http://www.rubyinside.com/simg/logo.gif "alt =" [/ img] http://www.rubyinside.com/ 2. Rails Inside is also a news station, the subscriber number of 3xxx [ ...

  • jdbc even ORACLE, SQLServer2000, mysql ways

    According to other people say can make a ride to one of the clear step by step, not as easy to write your own ideas! 1. Even the oracle The direct use of the oracle are provided give a jar package jdbc: oracle alone is installed, and 10g of oracle on ...

  • Rails source code analysis (1): RailsFCGIHandler

    In accordance with the sequence starting from the beginning CGI Ruby CGI Doc: The Common Gateway Interface ( CGI ) Is a simple protocol for passing an HTTP request from a web server to a standalone program, and returning the output to the web browser ...

  • Using Rails Captcha plug-in, easy implementation Verification Code

    Simple Captcha Plugin Can help us easily in the Rails implementation of Verification Code function. In addition, he has the option to provide sufficient to meet the U.S. requirements for certification, the use of easy. Supported picture and digital authen

  • Hibernate Inteceptor

    The end of the project stage, the client suddenly put forward a very troublesome but normal demand, the system records all changes must be carried out. Formats such as: 2004.1.1 12:30 Ikuya wind orders Sales Order Date 2004.1.2-> 2004.1.3 The firs ...

  • Ruby on Rails Routing - Simple Examples

    This article contains a list of ruby on rails routing examples. If you find you have any questions please leave a comment. Routes are processed from the top of routes.rb down. If a route is matched it will stop processing the routes.rb file and use that r

blog comments powered by Disqus
Recent
Recent Entries
Tag Cloud
Random Entries