Tag Info

New answers tagged

1

I don't know if this is what you are after, but this is how I always import / export long lists: Export Export["C:\\Directory\\list.txt", list] Import list = ToExpression[Import["C:\\Directory\\list.txt", "List"]];


2

Here's how I would do it with PaddedForm: Export["filepath.txt", StringJoin[ToString@PaddedForm[#, 6] & /@ {-1, 2, 3, 4, 5}]] This works with negative numbers as well. Will work the same with WriteString. If you want more control over the padding, you can use your own function... custompad[num_, padlength_?IntegerQ] := ...



Top 50 recent answers are included