Example #1
0
 /**
  * Remove a column from the dataset
  * 
  * @param int $number
  * @return boolean
  */
 public function removeColumn($number)
 {
     if (false === Cell::parseRef($number)) {
         throw new \InvalidArgumentException('Invalid column identifier');
     }
     $putData = array('method' => 'shiftCol', 'index' => $number - 1, 'amount' => 1);
     $setId = $this->getDataSet()->id;
     $result = $this->getClient()->put('data/alter/' . $setId, $putData);
     return isset($result['success']) && $result['success'];
 }
Example #2
0
?>

<h1><?php 
echo $dataSet->name;
?>
</h1>

<table>
    <thead>
        <tr>
            <th>#</th>
            <?php 
for ($i = 1; $i < $rows->getMaxColumns(); $i++) {
    ?>
                <th><?php 
    echo Cell::columnNumberToLetter($i);
    ?>
</th>
            <?php 
}
?>
        </tr>
    </thead>
    <tbody>
        <?php 
foreach ($rows as $row) {
    ?>
            <tr>
                <td><?php 
    echo $row->getRowNumber();
    ?>
Example #3
0
 /**
  * 
  * @param mixed $ref
  * @return boolean
  */
 public function hasCell($ref)
 {
     $number = Cell::parseRef($ref);
     if (false === $number) {
         throw new \InvalidArgumentException('Invalid cell reference');
     }
     return array_key_exists($number, $this->cells);
 }