此为 Mathematica 7 文档,内容基于更早版本的 Wolfram 语言
查看最新文档(版本11.2)
Mathematica HowTo
How to | Import a Spreadsheet
You can import spreadsheets in a variety of formats to take advantage of Mathematica's rich data manipulation and visualization capabilities.
This is a selection of examples from the complete 'How to' screencast »
Import the spreadsheet population.xls and set it to s:
In[1]:=
Click for copyable input
Out[1]=
Display the first worksheet of the spreadsheet s in a grid:
In[2]:=
Click for copyable input
Out[2]=
You can also import specific rows and columns of a spreadsheet.
Import only the first 3 rows of the spreadsheet:
In[3]:=
Click for copyable input
Out[3]=
Import only the first column of the first 3 rows of the spreadsheet:
In[4]:=
Click for copyable input
Out[4]=
Import only the second column of the first 3 rows of the spreadsheet:
In[5]:=
Click for copyable input
Out[5]=
Import only row 3 of the spreadsheet:
In[6]:=
Click for copyable input
Out[6]=