Hi @Frank Kosterman ,
The part of the code where the rows/columns are added looks fine.
It is recommended that you do step-by-step debugging and use Watch to monitor RowCount and ColumnCount to see at which step the value goes wrong.
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.