How to switch AutoFilter to the next line with a macro in LibreOffice Calc?

How to switch AutoFilter to the next line with a macro in LibreOffice Calc?

Open image with comments →

It is necessary to go through all the values AutoFilter and save visible rows in a separate files.

may be this:
macro to step through filtering options / values
can help for such wishes …