Esempio n. 1
0
 /** drawCols
  * Draws out a defined set of rows from the sheet.
  * @param $sheet The data container.
  * @param $begin The index of the begining row. (included)
  * @param $end The index of the end row (excluded)
  */
 function drawCols(TikiSheet &$sheet)
 {
     $sheetlib = TikiLib::lib('sheet');
     if (isset($sheet->metadata) && isset($sheet->metadata->widths)) {
         foreach ($sheet->metadata->widths as $width) {
             $this->output .= "<col style='width:" . $width * 1 . "px;' />";
         }
     } else {
         $beginCol = $sheet->getRangeBeginCol();
         $endCol = $sheet->getRangeEndCol();
         for ($i = $beginCol; $i < $endCol; $i++) {
             $style = $sheet->cellInfo[0][$i]['style'];
             $width = $sheetlib->get_attr_from_css_string($style, "width", "118px");
             $this->output .= "<col style='width: {$width};' width='{$width}' />\n";
         }
     }
 }