I have a list of numbers:
e.g. list={1,2,3,4,5}
To write the list to a file I use (here each integer number occupies 7 spaces):
WriteString[file,
Row[{Row[PaddedForm[#, 7] & /@ list, " "], "\n"}]];
(I took the proposal from: How can write a list as a formatted string to a file)
Is there also another solution to do that?