当前位置: 首页>>代码示例>>PHP>>正文


PHP PHPExcel::getActiveSheetIndex方法代码示例

本文整理汇总了PHP中PHPExcel::getActiveSheetIndex方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPExcel::getActiveSheetIndex方法的具体用法?PHP PHPExcel::getActiveSheetIndex怎么用?PHP PHPExcel::getActiveSheetIndex使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PHPExcel的用法示例。


在下文中一共展示了PHPExcel::getActiveSheetIndex方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testSimple

 public function testSimple()
 {
     $data = ['ROOT' => ['LEVEL1' => [['LEVEL1_CAPTION' => '1'], ['LEVEL1_CAPTION' => '2']]]];
     $namedRange = $this->output->getNamedRange('ROOT');
     $this->sut->write($data, $namedRange);
     $this->output->setActiveSheetIndexByName('TEMPLATE');
     $this->output->removeSheetByIndex($this->output->getActiveSheetIndex());
     $excelWriter = \PHPExcel_IOFactory::createWriter($this->output, 'Excel2007');
     $excelWriter->save(__DIR__ . '/../metadata/output/verticalrangewritertest.xlsx');
 }
开发者ID:mathielen,项目名称:report-write-engine,代码行数:10,代码来源:VerticalRangeWriterTest.php

示例2: _writeBookViews

 /**
  * Write BookViews
  *
  * @param 	PHPExcel_Shared_XMLWriter 	$objWriter 		XML Writer
  * @param 	PHPExcel					$pPHPExcel
  * @throws 	PHPExcel_Writer_Exception
  */
 private function _writeBookViews(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel $pPHPExcel = null)
 {
     // bookViews
     $objWriter->startElement('bookViews');
     // workbookView
     $objWriter->startElement('workbookView');
     $objWriter->writeAttribute('activeTab', $pPHPExcel->getActiveSheetIndex());
     $objWriter->writeAttribute('autoFilterDateGrouping', '1');
     $objWriter->writeAttribute('firstSheet', '0');
     $objWriter->writeAttribute('minimized', '0');
     $objWriter->writeAttribute('showHorizontalScroll', '1');
     $objWriter->writeAttribute('showSheetTabs', '1');
     $objWriter->writeAttribute('showVerticalScroll', '1');
     $objWriter->writeAttribute('tabRatio', '600');
     $objWriter->writeAttribute('visibility', 'visible');
     $objWriter->endElement();
     $objWriter->endElement();
 }
开发者ID:Princelo,项目名称:bioerp,代码行数:25,代码来源:Workbook.php

示例3: writeWindow1

 /**
  * Write Excel BIFF WINDOW1 record.
  */
 private function writeWindow1()
 {
     $record = 0x3d;
     // Record identifier
     $length = 0x12;
     // Number of bytes to follow
     $xWn = 0x0;
     // Horizontal position of window
     $yWn = 0x0;
     // Vertical position of window
     $dxWn = 0x25bc;
     // Width of window
     $dyWn = 0x1572;
     // Height of window
     $grbit = 0x38;
     // Option flags
     // not supported by PHPExcel, so there is only one selected sheet, the active
     $ctabsel = 1;
     // Number of workbook tabs selected
     $wTabRatio = 0x258;
     // Tab to scrollbar ratio
     // not supported by PHPExcel, set to 0
     $itabFirst = 0;
     // 1st displayed worksheet
     $itabCur = $this->phpExcel->getActiveSheetIndex();
     // Active worksheet
     $header = pack("vv", $record, $length);
     $data = pack("vvvvvvvvv", $xWn, $yWn, $dxWn, $dyWn, $grbit, $itabCur, $itabFirst, $ctabsel, $wTabRatio);
     $this->append($header . $data);
 }
开发者ID:jaya-project,项目名称:zycms,代码行数:33,代码来源:Workbook.php

示例4: getDayTest

 function getDayTest(PHPExcel $objPHPExcel, PHPExcel_Worksheet $sheet, $col = 'A', $row = 1, $day = 'ПОНЕДЕЛЬНИК')
 {
     $b = false;
     $index_sheet = $objPHPExcel->getActiveSheetIndex();
     $rowHiestIndex = PHPExcel_Cell::columnIndexFromString($sheet->getHighestColumn($row));
     for ($i = 0; $i <= $rowHiestIndex; $i++) {
         $cell_value = $this->getValueMergedCell($objPHPExcel, $index_sheet, $this->arr_merged_allCells, $i, $row);
         if ($cell_value == $day) {
             return $b = true;
         }
     }
     if (!$b) {
         $colHiestIndex = $sheet->getHighestRow($col);
         for ($i = 0; $i <= $colHiestIndex; $i++) {
             $cell_value = $this->getValueMergedCell($objPHPExcel, $index_sheet, $this->arr_merged_allCells, $col, $i);
             if ($cell_value == $day) {
                 return $b = true;
             }
         }
     }
     return $b;
 }
开发者ID:ViktorKITP,项目名称:schedule,代码行数:22,代码来源:finder.php

示例5: array

        $objPHPExcel->getActiveSheet()->getColumnDimension($coluna)->setAutoSize(true);
        $objPHPExcel->getActiveSheet()->getStyle($coluna . '1')->getFont()->setBold(true);
    }
}
$colunas = array('A' => 'CAMPUS', 'B' => 'CURSO', 'C' => 'LOCAL DE PROVA', 'D' => 'INSCRITO', 'E' => 'N. INSCRICAO', 'F' => 'CPF', 'G' => 'RG', 'H' => 'ORGAO EXPEDIDOR', 'I' => 'UF', 'J' => 'DATA DE EXPEDICAO', 'K' => 'NACIONALIDADE', 'L' => 'DATA DE NASCIMENTO', 'M' => 'SEXO', 'N' => 'ENDERECO', 'O' => 'CEP', 'P' => 'CIDADE', 'Q' => 'ESTADO', 'R' => 'TELEFONE', 'S' => 'CELULAR', 'T' => 'EMAIL', 'U' => 'ESTADO CIVIL', 'V' => 'NECESSIDADE ESPECIAL', 'W' => 'DESCRICAO NECESSIDADE ESPECIAL', 'X' => 'ISENCAO DE TAXA', 'Y' => 'CONDICOES ESPECIAIS PARA REALIZACAO DA PROVA', 'Z' => 'DESCRICAO CONDICOES ESPECIAIS PARA REALIZACAO DA PROVA', 'AA' => 'CONCORRE AS VAGAS DESTINADAS A CANDIDATOS COM NECESSIDADES ESPECIAIS');
$query = $banco->ExecutaQueryGenerica($sql);
$numResults = mysql_num_rows($query);
$linha = 2;
$campus_id = null;
while ($row = mysql_fetch_assoc($query)) {
    $val = array_values($row);
    if ($campus_id != $val[0]) {
        $campus_id = $val[0];
        if ($campus_id > 1 && $numResults > 1) {
            $objPHPExcel->createSheet();
            $objPHPExcel->setActiveSheetIndex($objPHPExcel->getActiveSheetIndex() + 1);
        }
        $objPHPExcel->getActiveSheet()->setTitle(removeAcentos($val[1]));
        setCabecalho($objPHPExcel, $colunas);
        $linha = 2;
    }
    $col = 1;
    foreach ($colunas as $coluna => $valor) {
        if ($val[$col] == null) {
            $objPHPExcel->getActiveSheet()->SetCellValue($coluna . $linha, '---');
        } else {
            $objPHPExcel->getActiveSheet()->SetCellValue($coluna . $linha, utf8_encode($val[$col]));
        }
        $col++;
    }
    $linha++;
开发者ID:arvdigo,项目名称:eadsie,代码行数:31,代码来源:relatorio_geral.php

示例6: get_active_worksheet

 /**
  * Get the currently active sheet
  * 
  * @return PHPExcel_Worksheet
  */
 public function get_active_worksheet()
 {
     return $this->_worksheets[$this->_spreadsheet->getActiveSheetIndex()];
 }
开发者ID:efremovich,项目名称:kohana-phpexcel,代码行数:9,代码来源:Spreadsheet.php

示例7: clean

 protected function clean()
 {
     $this->output->setActiveSheetIndexByName('TEMPLATE');
     $this->output->removeSheetByIndex($this->output->getActiveSheetIndex());
 }
开发者ID:mathielen,项目名称:report-write-engine,代码行数:5,代码来源:ExcelCanvasWriter.php


注:本文中的PHPExcel::getActiveSheetIndex方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。