Honestly, no, I tried other code generators, they all work fine except with the text you're using, so there must be something there that forces Excel to close down but I don't know.

If you place another text in your file then it works.
So you will have to use the one that requires Internet or else you will have to do more testing. I don't have a better answer for you