aVadim483 / fast-excel-writer

Lightweight and very fast XLSX Excel Spreadsheet Writer in PHP
MIT License
178 stars 31 forks source link

Merge cells & Set autofilter #69

Closed AndreeaMb closed 4 months ago

AndreeaMb commented 4 months ago

When I try to generate an excel file, and I use mergeCells() and setAutofilter() togheter, there is a conflict in the file.

This is my code(I try to merge some cells in the first row, and to add the autofilters for the second row):

....
$sheet->setAutofilter(2);

if($this->current_tab == 0) {
    $sheet->mergeCells("A1:E1");
}
....

The excel file is generated without errors, but when I try to open the file, I can not and I receive this alert:

Alert We found a problem with some content in ’xxxxx.xlsx’. Do you want us to try to recover as much as we can? If you trust the source of this workbook, click Yes.

Is there a way to use these methods togheter?

aVadim483 commented 4 months ago

Well, I will look into this problem

aVadim483 commented 4 months ago

fixed in version 5.6.1

AndreeaMb commented 4 months ago

Thank you!