code: private function writeColinfo($col_array)
      {
          if (isset($col_array[0])) {
              $colFirst = $col_array[0];
          }
          if (isset($col_array[1])) {
              $colLast = $col_array[1];
          }
          if (isset($col_array[2])) {
              $coldx = $col_array[2];
          } else {
              $coldx = 8.43;
          }
          if (isset($col_array[3])) {
              $xfIndex = $col_array[3];
          } else {
              $xfIndex = 15;
          }
          if (isset($col_array[4])) {
              $grbit = $col_array[4];
          } else {
              $grbit = 0;
          }
          if (isset($col_array[5])) {
              $level = $col_array[5];
          } else {
              $level = 0;
          }
          $record = 0x007D; // Record identifier
          $length = 0x000C; // Number of bytes to follow
  
          $coldx *= 256; // Convert to units of 1/256 of a char
  
          $ixfe = $xfIndex;
          $reserved = 0x0000; // Reserved
  
          $level = max(0, min($level, 7));
          $grbit |= $level << 8;
  
          $header = pack('vv', $record, $length);
          $data = pack('vvvvvv', $colFirst, $colLast, $coldx, $ixfe, $grbit, $reserved);
          $this->append($header . $data);
      }
docs: Write BIFF record COLINFO to define column widths.
  
  Note: The SDK says the record length is 0x0B but Excel writes a 0x0C
  length record.
  
  @param array $col_array This is the only parameter received and is composed of the following:
  0 => First formatted column,
  1 => Last formatted column,
  2 => Col width (8.43 is Excel default),
  3 => The optional XF format of the column,
  4 => Option flags.
  5 => Optional outline level