本文整理汇总了PHP中PHPExcel_Worksheet::getSheetView方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPExcel_Worksheet::getSheetView方法的具体用法?PHP PHPExcel_Worksheet::getSheetView怎么用?PHP PHPExcel_Worksheet::getSheetView使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPExcel_Worksheet
的用法示例。
在下文中一共展示了PHPExcel_Worksheet::getSheetView方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addSheet
protected function addSheet($name)
{
$sheet = new PHPExcel_Worksheet($this->excel, $name);
$sheet->getSheetView()->setZoomScale(75);
$this->excel->addSheet($sheet);
$this->excel->setActiveSheetIndex($this->excel->getSheetCount() - 1);
$this->sheet = $sheet;
}
示例2: _writePageLayoutView
/**
* Write PLV Record
*/
private function _writePageLayoutView()
{
$record = 0x88b;
// Record identifier
$length = 0x10;
// Bytes to follow
$rt = 0x88b;
// 2
$grbitFrt = 0x0;
// 2
$reserved = 0x0;
// 8
$wScalvePLV = $this->_phpSheet->getSheetView()->getZoomScale();
// 2
// The options flags that comprise $grbit
if ($this->_phpSheet->getSheetView()->getView() == PHPExcel_Worksheet_SheetView::SHEETVIEW_PAGE_LAYOUT) {
$fPageLayoutView = 1;
} else {
$fPageLayoutView = 0;
}
$fRulerVisible = 0;
$fWhitespaceHidden = 0;
$grbit = $fPageLayoutView;
// 2
$grbit |= $fRulerVisible << 1;
$grbit |= $fWhitespaceHidden << 3;
$header = pack("vv", $record, $length);
$data = pack("vvVVvv", $rt, $grbitFrt, 0x0, 0x0, $wScalvePLV, $grbit);
$this->_append($header . $data);
}
示例3: _writeZoom
/**
* Store the window zoom factor. This should be a reduced fraction but for
* simplicity we will store all fractions with a numerator of 100.
*/
private function _writeZoom()
{
// If scale is 100 we don't need to write a record
if ($this->_phpSheet->getSheetView()->getZoomScale() == 100) {
return;
}
$record = 0xa0;
// Record identifier
$length = 0x4;
// Bytes to follow
$header = pack("vv", $record, $length);
$data = pack("vv", $this->_phpSheet->getSheetView()->getZoomScale(), 100);
$this->_append($header . $data);
}
示例4: count
if (($fmtRuns = $this->_sst[$index]['fmtRuns']) && !$this->_readDataOnly) {
// then we should treat as rich text
$richText = new PHPExcel_RichText();
$charPos = 0;
$sstCount = count($this->_sst[$index]['fmtRuns']);
for ($i = 0; $i <= $sstCount; ++$i) {
if (isset($fmtRuns[$i])) {
$text = PHPExcel_Shared_String::Substring($this->_sst[$index]['value'], $charPos, $fmtRuns[$i]['charPos'] - $charPos);
$charPos = $fmtRuns[$i]['charPos'];
} else {
$text = PHPExcel_Shared_String::Substring($this->_sst[$index]['value'], $charPos, PHPExcel_Shared_String::CountCharacters($this->_sst[$index]['value']));
}
if (PHPExcel_Shared_String::CountCharacters($text) > 0) {
if ($i == 0) {