Example:
//Instantiate the workbook object $workbook = new cells\Workbook("Book1.xls"); //Get Cells collection $cells = $workbook->getWorksheets()->get(0)->getCells(); //Instantiate FindOptions Object $findOptions = new cells\FindOptions(); //Create a Cells Area $ca = new cells\CellArea(); $ca->StartRow = 0; $ca->StartColumn = 0; $ca->EndRow = 17; $ca->EndColumn = 13; //Set cells area for find options $findOptions->setRange($ca); //Set searching properties $findOptions->setSearchNext(true); $findOptions->setSeachOrderByRows(true); $findOptions->setLookInType(cells\LookInType::VALUES); //Find the cell with 0 value $cell =$cells->find("a", null, $findOptions); echo "Found cell: ".$cell."\n";
Constructor Summary |
---|
Property Getters/Setters Summary | ||
---|---|---|
function | getCaseSensitive() | |
function | setCaseSensitive(value) | |
Indicates if the searched string is case sensitive. | ||
function | getConvertNumericData() | |
function | setConvertNumericData(value) | |
Gets or sets a value that indicates whether converting the searched string value to numeric data. | ||
function | isRangeSet() | |
Indicates whether the searched range is set.
|
||
function | getLookAtType() | |
function | setLookAtType(value) | |
Look at type. The value of the property is LookAtType integer constant. | ||
function | getLookInType() | |
function | setLookInType(value) | |
Look in type. The value of the property is LookInType integer constant. | ||
function | getRegexKey() | |
function | setRegexKey(value) | |
Indicates whether the searched key is regex. If true the searched key will be taken as regex and parsed. Otherwise the key will be parsed according to the rules in ms excel. | ||
function | getSeachOrderByRows() | |
function | setSeachOrderByRows(value) | |
Indicates whether search order by rows or columns. | ||
function | getSearchBackward() | |
function | setSearchBackward(value) | |
Whether search backward for cells. | ||
function | getSearchNext() | |
function | setSearchNext(value) | |
Search order. True: search next. False: search previous. | ||
function | getStyle() | |
function | setStyle(value) | |
The format to search for. | ||
function | getValueTypeSensitive() | |
function | setValueTypeSensitive(value) | |
Indicates whether searched cell value type should be same with the searched key. |
Method Summary | ||
---|---|---|
function | getRange() | |
Gets and sets the searched range.
|
||
function | setRange(ca) | |
Sets the searched range.
|
function getCaseSensitive() / function setCaseSensitive(value)
function getLookAtType() / function setLookAtType(value)
function isRangeSet()
function getSearchNext() / function setSearchNext(value)
function getSearchBackward() / function setSearchBackward(value)
function getSeachOrderByRows() / function setSeachOrderByRows(value)
function getLookInType() / function setLookInType(value)
function getRegexKey() / function setRegexKey(value)
function getValueTypeSensitive() / function setValueTypeSensitive(value)
function getStyle() / function setStyle(value)
function getConvertNumericData() / function setConvertNumericData(value)