It seems that there is an issue with writing to files on Macros. I tried both “print” and “File.append”, but neither of them behave as expected when using “\t”. Instead of a tab delimiter, one gets a new line behaviour.
Currently, I go around the issue by printing out single lines from within a double loop, but this is not ideal.
I noted that the issue was brought up before, but not resolved: