| @@ 134-144 (lines=11) @@ | ||
| 131 | return $this; |
|
| 132 | } |
|
| 133 | ||
| 134 | public function setColValues($colIndex, $values=array()) { |
|
| 135 | $count=$this->count(); |
|
| 136 | if (\is_array($values) === false) { |
|
| 137 | $values=\array_fill(0, $count, $values); |
|
| 138 | } |
|
| 139 | $count=\min(\sizeof($values), $count); |
|
| 140 | for($i=0; $i < $count; $i++) { |
|
| 141 | $this->getCell($i, $colIndex)->setValue($values[$i]); |
|
| 142 | } |
|
| 143 | return $this; |
|
| 144 | } |
|
| 145 | ||
| 146 | public function addColVariations($colIndex, $variations=array()) { |
|
| 147 | $count=$this->count(); |
|
| @@ 61-72 (lines=12) @@ | ||
| 58 | * Sets values to the row cols |
|
| 59 | * @param mixed $values |
|
| 60 | */ |
|
| 61 | public function setValues($values=array()) { |
|
| 62 | $count=$this->count(); |
|
| 63 | if (\is_array($values) === false) { |
|
| 64 | $values=\array_fill(0, $count, $values); |
|
| 65 | } |
|
| 66 | $count=\min(\sizeof($values), $count); |
|
| 67 | ||
| 68 | for($i=0; $i < $count; $i++) { |
|
| 69 | $cell=$this->content[$i]; |
|
| 70 | $cell->setValue($values[$i]); |
|
| 71 | } |
|
| 72 | } |
|
| 73 | ||
| 74 | /** |
|
| 75 | * Removes the col at $index |
|