Given an array I would like to print it in Mathematica such that the values can be simply copied and pasted into an Excel's row. What is the best approach for this?
data = Array[0, 32];
For[k = 1, k < 100, k++,
i = RandomInteger[{1, 32}];
data[[i]] = data[[i]] + 1;
];
data
output:
{5 + 0[1], 4 + 0[2], 4 + 0[3], 3 + 0[4], 1 + 0[5], 1 + 0[6], 1 + 0[7],
5 + 0[8], 3 + 0[9], 0[10], 3 + 0[11], 2 + 0[12], 4 + 0[13],
4 + 0[14], 2 + 0[15], 5 + 0[16], 1 + 0[17], 4 + 0[18], 2 + 0[19],
1 + 0[20], 4 + 0[21], 2 + 0[22], 2 + 0[23], 2 + 0[24], 4 + 0[25],
2 + 0[26], 4 + 0[27], 4 + 0[28], 4 + 0[29], 8 + 0[30], 4 + 0[31],
4 + 0[32]}
data = Array[a, {5, 5}]; Export["exportedData.xls", data // Flatten];
Then openexportedData.xls
inExcel
$\endgroup$data // Flatten // Column
select data thenCopy As
Plain Text
. Select cell inExcel
andPaste
$\endgroup$