moses's avatar
Level 2

How can I make default page number to every sheet on maatwebsite?(laravel-excel)

I use laravel 5.6, php 7.1 and maatwebsite 3.1

My script to display page number like this :

$event->sheet->getHeaderFooter()->setOddFooter('&R&P');

It works. But my problem is I have 3 sheet. On the every sheet display page number start of 1

I want in the sheet 1, it display page number 1-3. In the sheet 2, it will display page number 4-6. And the sheet 3, it display page number 7-9

I want like that. I had searching reference, but I don't find it

Please help me to solve this problem. I need support for PhpSpreadsheet functionality

0 likes
2 replies
bobbybouwmann's avatar

I think you have to set it per page of every sheet and keep the count yourself. This functionality is not possible at this point in the library.

moses's avatar
Level 2

@bobbybouwmann So you mean there is no function in the library that can help me? My page is dynamic depending on the data in the database. So it seems to be difficult for me to make that function

Please or to participate in this conversation.