|
@@ -4,7 +4,7 @@
|
|
|
*
|
|
|
* Requires PHP 5.2
|
|
|
*
|
|
|
- * @version $Id: Calc_Reader.php,v 1.2 2007-08-06 06:17:06 marand Exp $
|
|
|
+ * @version $Id: Calc_Reader.php,v 1.3 2007-08-06 16:32:48 marand Exp $
|
|
|
* @license CeCILL 2.0
|
|
|
* @copyright 2005-2006 Ouest Systemes Informatiques
|
|
|
*/
|
|
@@ -44,11 +44,14 @@ class Calc_Reader
|
|
|
* Return the rows in the spreadsheet as a DOMNodeList
|
|
|
* WARNING: this means ALL the rows, in all the sheets, not just the first sheet
|
|
|
*
|
|
|
+ * @param string $namedRange Optional name of range, notably Sheet name
|
|
|
* @return DOMNodeList
|
|
|
*/
|
|
|
- function getRows ()
|
|
|
+ function getRows ($namedRange = NULL)
|
|
|
{
|
|
|
- $query = '//table:table-row';
|
|
|
+ $query = empty($namedRange)
|
|
|
+ ? '//table:table-row'
|
|
|
+ : '//table:table[@table:name="' . $namedRange . '"]/table:table-row';
|
|
|
|
|
|
$ret = $this->xpath->query($query);
|
|
|
unset($query);
|