'openpyxl: How can I detect the changement of page when i write too much row?

I'm writting table of datas on an xlsx file. When I write too much row on the page, it automatically goes to a next page. I need to know when I pass to this new page.

My rows can have different height so I can't only count the number of rows. I need something like: "the line 467 is in the 16th page".

But I don't know if something exist that could do this. I'm gonna work on something counting the height of eact row and try to find it manually (but that's a dirty way to do it...)

My goal is to add a title on every page generated (it works automatically for the headers but I already have something on the header so I have to manually add it on the rows).



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source