Get all deals in Excel through the API

I have been trying around for some days but havent been able to implement pagination in excel and get all data. Any help or working code examples will be much appreciated.

The following wiki might be useful

Feel free to create a new topic if you still face challenges.