Skip to content

Commit

Permalink
https://github.com/aVadim483/fast-excel-writer/issues/69
Browse files Browse the repository at this point in the history
  • Loading branch information
aVadim483 committed Jul 23, 2024
1 parent 0084040 commit 71ceecc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## v.5.6
Excel::setActiveSheet($name): Excel -- Set active (default) sheet by case-insensitive name
Sheet::isName($name): bool -- Case-insensitive name checking
Sheet::setPrintArea($range): Sheet
Sheet::setPrintTopRows($rows): Sheet
Sheet::setPrintLeftColumns($cols): Sheet
Sheet::setPrintGridlines($bool): Sheet
* Excel::setActiveSheet($name): Excel -- Set active (default) sheet by case-insensitive name
* Sheet::isName($name): bool -- Case-insensitive name checking
* Sheet::setPrintArea($range): Sheet
* Sheet::setPrintTopRows($rows): Sheet
* Sheet::setPrintLeftColumns($cols): Sheet
* Sheet::setPrintGridlines($bool): Sheet

## v.5.5

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![Latest Stable Version](http://poser.pugx.org/avadim/fast-excel-writer/v)](https://packagist.org/packages/avadim/fast-excel-writer)
[![Total Downloads](http://poser.pugx.org/avadim/fast-excel-writer/downloads)](https://packagist.org/packages/avadim/fast-excel-writer)
[![GitHub Release](https://img.shields.io/github/v/release/aVadim483/fast-excel-writer)](https://packagist.org/packages/avadim/fast-excel-writer)
[![Packagist Downloads](https://img.shields.io/packagist/dt/avadim/fast-excel-writer?color=%2300aa00)](https://packagist.org/packages/avadim/fast-excel-writer)
[![License](http://poser.pugx.org/avadim/fast-excel-writer/license)](https://packagist.org/packages/avadim/fast-excel-writer)
[![PHP Version Require](http://poser.pugx.org/avadim/fast-excel-writer/require/php)](https://packagist.org/packages/avadim/fast-excel-writer)

Expand Down
12 changes: 6 additions & 6 deletions src/FastExcelWriter/Writer/Writer.php
Original file line number Diff line number Diff line change
Expand Up @@ -1179,6 +1179,12 @@ public function writeSheetDataEnd(Sheet $sheet)
$sheet->fileWriter->write('<sheetProtection' . self::tagAttributes($options) . '/>');
}

if ($sheet->autoFilter) {
$minCell = $sheet->autoFilter;
$maxCell = Excel::cellAddress($sheet->rowCountWritten, $sheet->colCountWritten);
$sheet->fileWriter->write('<autoFilter ref="' . $minCell . ':' . $maxCell . '"/>');
}

$mergedCells = $sheet->getMergedCells();
if ($mergedCells) {
$sheet->fileWriter->write('<mergeCells>');
Expand All @@ -1188,12 +1194,6 @@ public function writeSheetDataEnd(Sheet $sheet)
$sheet->fileWriter->write('</mergeCells>');
}

if ($sheet->autoFilter) {
$minCell = $sheet->autoFilter;
$maxCell = Excel::cellAddress($sheet->rowCountWritten, $sheet->colCountWritten);
$sheet->fileWriter->write('<autoFilter ref="' . $minCell . ':' . $maxCell . '"/>');
}

$links = $sheet->getExternalLinks();
if ($links) {
$sheet->fileWriter->write('<hyperlinks>');
Expand Down

0 comments on commit 71ceecc

Please sign in to comment.