Mathematica is the world's most famous mathematical software, and the ability to handle matrix list data is very powerful. If you can use Mathematica with Microsoft Excel, it will be significant.
You can interact with a computer with Mathematica installed, and then install a plugin called Mathematica Link for Excel 3.5.
Start Mathematica 8.0, create a new NB file, and enter the following code:
in[17]:= needs["Excellink"]
in[18]:= excelinstall[visible-True]
out[18]= linkobject["\" C:\\Documents and Settings\\All \
Users\\Application \
Data\\mathematica\\applications\\excellink\\binaries\\excellink.exe\ "\
", 97, 8]
in[19]:= m = {{3, 5, 7, 9}, {4, 6, 8, 12}};
in[20]:= excel["a1:d2"] = m
(* above, is the numeric value for writing Mathematica memory variables into Excel *)
in[46]:= r = excel["A1:a4"]
out[46]= {26., 91., 6., 23.}
in[51]:= p = r/total[r];
Piechart3d[r, Chartstyle, {Pink, Red, Green, Yellow},
Chartlabels, n[p*100, 3] "%", Chartlegends, Col]
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/7E/CB/wKiom1cItJTSWR-9AABP5xyzMhg813.gif "title=" Mlx.gif "alt=" Wkiom1citjtswr-9aabp5xyzmhg813.gif "/>
In the above code, line 17th, the function is to start link, line 18th, is Mathematica gets to the running Excel application.
Line 19th, create a two-dimensional list m, line 20th in the NB file, and send the value of M to the Excel cell range.
Line 46th, variable R to get the score data from the Excel worksheet, line 51st, Mathematica creates a pie chart based on the value of R.
This article is from the "Vba_expert" blog, make sure to keep this source http://ryueifu.blog.51cto.com/6673733/1762084
Using the Mathematica operations to control Excel-mathematica Link for Excel operations