PHP Excelreader2 Export class Read function detailed

Source: Internet
Author: User
Tags export class functions numeric numeric value php excel php web development string format mysql database

After learning the PHP jpgraph installation and use tutorial, I would like to introduce the PHP export Excel class PHP excelreader2.21,php excelreader2.21 is a special used to export (read) Excel file content of the PHP export Excel class , learning to use PHP to export Excel files will also provide the basis for future statistical data using PHP jpgraph charting. In the PHP Excel reader2.21 export Excel Chinese garbled solution Tutorial I have briefly introduced the PHP Excelreader. To learn the basics of using PHP excelreader2.21 to export Excel file content in the future, I'll explain the functions that are needed to export Excel files in the PHP excelreader2.21 class.

PHP Excel Export Class Excelreader Public functions are mainly divided into the following aspects

  Export the various values of cells in Excel

1
2
function Val ($row, $col, $sheet =0)
function value ($row, $col, $sheet =0)

  The Val function and the value function description : Gets the value within a cell, and if not, returns a null value.
Row: Digital Form
Col: Numeric or string format, string not case-sensitive

1
2
function type ($row, $col, $sheet =0)
function Raw ($row, $col, $sheet =0)

Because I am not fully aware of the specific properties of the Excel object so that I do not fully understand what these two functions are, perhaps in the future PHP import export Excel instances will understand, if you know welcome message to tell me, thank you.

  Export various properties of cells in Excel

1
2
3
function rowspan ($row, $col, $sheet =0)

function colspan ($row, $col, $sheet =0)

  rowspan Function Description : Determines whether a cell is a row merge, if it returns the number of specific merged rows, no merge returns 1
  colspan function Description : Determines whether a cell is a column merge, if so, returns the number of specific merged columns, and returns 1 if not merged.

1
function hyperlink ($row, $col, $sheet =0)

  Hyperlink Function Description : Determine a cell is a hyperlink, if so return the specific link address, otherwise return null value. Note: The col argument must be a number, not a string, or it will return a null value

1
2
3
4
5
6
7
8
9
10
11
function rowcount ($sheet =0)

function ColCount ($sheet =0)

function Colwidth ($col, $sheet =0)

function Colhidden ($col, $sheet =0)

function RowHeight ($row, $sheet =0)

function Rowhidden ($row, $sheet =0)

  RowCount function Description: return to Excel work there are always a number of lines
  colcount Function Description: return to Excel work this total number of columns
  colwidth Function Description: Returns the width of a column, the column parameter must be a number
  Colhidden Function Description: to determine whether a column is hidden, is to return 1, otherwise return null value, column parameters must be numeric
  rowheight Function Description: Returns the height of a row
  Rowhidden Function Description: Determines whether a row is hidden, returns 1, or returns a null value
  
  Export CSS properties for cells in Excel

1
function Style ($row, $col, $sheet =0, $properties = ")

  style function Description : Returns the CCS property of a cell

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
function align ($row, $col, $sheet =0)

function bgcolor ($row, $col, $sheet =0)

function Borderleft ($row, $col, $sheet =0)

function BorderRight ($row, $col, $sheet =0)

function BorderTop ($row, $col, $sheet =0)

function BorderBottom ($row, $col, $sheet =0)

function borderLeftColor ($row, $col, $sheet =0)

function borderRightColor ($row, $col, $sheet =0)

function borderTopColor ($row, $col, $sheet =0)

function borderBottomColor ($row, $col, $sheet =0)

  Align Function Description : Returns the alignment properties of the specified cell, such as left, right, center, and so on
  bgcolor function Description : Returns the background color of a cell as a numeric value, the cell must have a color, or it returns a null value
  borderleft Function Description : Returns the type of Borderleft as a string, noting that the cell must be of the Borderleft property, otherwise it returns a null value. Similar functions have borderright,bordertop,borderbottom.
  borderleftcolor Function Description : Returns the color value of borderleft, such as #ff0000, with 4-bit hexadecimal at the beginning of #. Similar functions have borderrightcolor,bordertopcolor,borderbottomcolor.

  Export cell font properties in Excel

1
function color ($row, $col, $sheet =0)

  Color Function Description : Returns the font in a cell, returned as a string, such as red

1
2
3
function Bold ($row, $col, $sheet =0)
function Italic ($row, $col, $sheet =0)
function underline ($row, $col, $sheet =0)

  Bold Function Description : Returns whether the font in a cell is bold and returns 1
  Italic Function Description : Returns whether the font in a cell is italic and returns 1
  underline function Description : Returns whether the font in a cell is underlined and returns 1

1
2
function height ($row, $col, $sheet =0)
function Font ($row, $col, $sheet =0)

  Height Function Description : Returns the font size in a cell
  Font function Description : Returns the name of a font in a cell

So far, PHP export Excel class excelreader2.21 read the contents of the Excel file Public function description is done, as long as the understanding and grasp the use of these functions, using PHP excelreader2.21 Exporting Excel content is simple and provides a bridge for importing Excel content into the MySQL database.

  Note : PHP Web Development Tutorials-leapsoul.cn Copyright, reproduced in the form of links to indicate the original source and this statement, thank you.







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.