Re:Copying from Excel 97
- To: mathgroup@smc.vnet.net
- Subject: [mg11309] Re:[mg11232] Copying from Excel 97
- From: Tomas Garza <tgarza@mail.internet.com.mx>
- Date: Wed, 4 Mar 1998 01:40:13 -0500
Lawrence Walker wrote:
> When I try copying a block of values from Excel 97 to Mathematica3 I get
> a list of numbers with the first entry of each row running together
> with the last number from the previous row. As a result I have to
> manually enter spaces between the numbers.
Lawrence:
It is not a good idea to copy blocks of values from Excel. If the block
s short, better enter it manually. Otherwise, I suggest using
ReadList.
he block you want to read in may be in txt format as a
separate file, ay numbers.txt.
If you now say within your notebook
In[1]:eadList["numbers.txt",{Number}]
you get
Out[1]{{1},{2},{3},{4},{5},{6},{7},{8},{9}}
If you say
In[2]:ReadList["numbers.txt",{Number},RecordLists->True]
you'll get
Out[2]{{{1},{2},{3}},{{4},{5},{6}},{{7},{8},{9}}}
Other choices are available. Make sure you give the correct path for your file.
Good luck,
Tomas Garza
Mexico City