Have you considered to employ a garbage collector, or a Cache node before writing the excel file. Another option might be to save the file in a table or parquet file and do the writing to excel in another workflow to save on Java heap space (if this indeed is the problem).
Also you could try to use the new columnar storage and force some nodes to write results to disk.
Then there are other ways to write an excel file, namely from within Python, of course not an elegant solution could just be to see if this could bring any improvement.