Please suggest how to export multiple tables in a single excel file. I am trying to use the code given below:
d1 = {{1, 26.00}, {0.8, 35.43}, {0.6, 33.40}, {0.4, 31.11}, {0, 56.67}};
d2 = {{1, 45.58}, {0.8, 50.16}, {0.6, 56.18}, {0.4, 57.03}, {0, 33.17}};
d3 = {{1, 10.23}, {0.8, 9.13}, {0.6, 6.88}, {0.4, 10.11}, {0, 5.86}};
d11 = TableForm[d1];
d22 = TableForm[d2];
d33 = TableForm[d3];
Export["d1diles.xls", {d11, d22, d33}, "XLS"]
Also, the 1st column is common in all tables, so I just want it to appear in the spreadsheet one time.
Export["d1diles.xls", {d1, d2, d3}, "XLS"]
You want to export the lists.TableForm
is for display puposes. $\endgroup$ – LouisB Dec 5 '20 at 7:06Export["d1diles.xls", Transpose@ Flatten[Transpose /@ {d1, d2, d3}, 1][[{1, 2, 4, 6}]], "XLS"]
$\endgroup$ – LouisB Dec 5 '20 at 8:25Export["d1diles.xls", Join[{#[[1, 1]]}, #[[All, 2]]] & /@ GatherBy[Flatten[{d1, d2, d3}, 1], First] // Sort]
$\endgroup$ – Bob Hanlon Dec 5 '20 at 15:56