How to write big excel data with help of loop function?

Hi everyone,

I have an Excel sheet containing around 30,000 rows of data. I want to split it into smaller table and paste it into master excel in loop as I am seeing Java heap space error when I try to write entire sheet into master excel.

I’m trying to understand how to do this efficiently.

Thanks in advance for any help or example workflows!