@@ 1952-1960 (lines=9) @@ | ||
1949 | * @throws Exception |
|
1950 | * @return PHPExcel_Worksheet |
|
1951 | */ |
|
1952 | public function insertNewRowBefore($pBefore = 1, $pNumRows = 1) { |
|
1953 | if ($pBefore >= 1) { |
|
1954 | $objReferenceHelper = PHPExcel_ReferenceHelper::getInstance(); |
|
1955 | $objReferenceHelper->insertNewBefore('A' . $pBefore, 0, $pNumRows, $this); |
|
1956 | } else { |
|
1957 | throw new Exception("Rows can only be inserted before at least row 1."); |
|
1958 | } |
|
1959 | return $this; |
|
1960 | } |
|
1961 | ||
1962 | /** |
|
1963 | * Insert a new column, updating all possible related data |
|
@@ 1970-1978 (lines=9) @@ | ||
1967 | * @throws Exception |
|
1968 | * @return PHPExcel_Worksheet |
|
1969 | */ |
|
1970 | public function insertNewColumnBefore($pBefore = 'A', $pNumCols = 1) { |
|
1971 | if (!is_numeric($pBefore)) { |
|
1972 | $objReferenceHelper = PHPExcel_ReferenceHelper::getInstance(); |
|
1973 | $objReferenceHelper->insertNewBefore($pBefore . '1', $pNumCols, 0, $this); |
|
1974 | } else { |
|
1975 | throw new Exception("Column references should not be numeric."); |
|
1976 | } |
|
1977 | return $this; |
|
1978 | } |
|
1979 | ||
1980 | /** |
|
1981 | * Insert a new column, updating all possible related data |
|
@@ 2004-2012 (lines=9) @@ | ||
2001 | * @throws Exception |
|
2002 | * @return PHPExcel_Worksheet |
|
2003 | */ |
|
2004 | public function removeRow($pRow = 1, $pNumRows = 1) { |
|
2005 | if ($pRow >= 1) { |
|
2006 | $objReferenceHelper = PHPExcel_ReferenceHelper::getInstance(); |
|
2007 | $objReferenceHelper->insertNewBefore('A' . ($pRow + $pNumRows), 0, -$pNumRows, $this); |
|
2008 | } else { |
|
2009 | throw new Exception("Rows to be deleted should at least start from row 1."); |
|
2010 | } |
|
2011 | return $this; |
|
2012 | } |
|
2013 | ||
2014 | /** |
|
2015 | * Remove a column, updating all possible related data |