0
$\begingroup$

I have a such table

table = Table[{i, 2*i}, {i, 10}];

Now I want to export it as a .txt file. If I use "Table" like this

Export["test.txt", table, "Table"]

I will get a \t as the separator. If I use "CSV" like this

Export["test.txt", table, "CSV"]

I will get a , as the separator.

But actually I hope use a blank space as the separator. Is it possible?

$\endgroup$
0

1 Answer 1

2
$\begingroup$
Export["test.txt", table, "Table", "FieldSeparators" -> " "]

There's also "TextDelimiters" -> " " that might be useful in some instances.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.