As an example I have a data list of dimension {10, 5}:
data=Get["http://pastebin.com/raw/AxGXqgAb"] {{15,0,0,69,250},{15,0,0,88,121},{15,0,0,107,248},{15,0,0,125,119}, {15,0,0,144,246},{15,0,0,163,117},{15,0,0,181,244},{15,0,0,200,115}, {15,0,0,219,242},{15,0,0,237,113}} I want to export the integers (0-255) right aligned into a text file with 10 rows and 5 columns (no curly braces) and each integer should occupy 3 spaces with a white space in between.
My code does not exactly what I want and looks relatively complicated.
formatted=Map[NumberForm[#,{3,0},NumberPadding->{" ","0"},NumberPoint->""]&,data,{2}] Export[StringJoin[imageDir,"\\timeStampBytes4.txt"],formatted,"Table"]; The output file contains:
15 0 0 69 250 15 0 0 88 121 15 0 0 107 248 15 0 0 125 119 15 0 0 144 246 15 0 0 163 117 15 0 0 181 244 15 0 0 200 115 15 0 0 219 242 15 0 0 237 113 What is the most straightforward solution for my problem?