MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re:Copying from Excel 97



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



  • Prev by Date: RE: init.m on IBM
  • Next by Date: RE: Mathematica graphics to AutoCad?
  • Prev by thread: RE: Copying from Excel 97
  • Next by thread: Re: Copying from Excel 97