MathGroup Archive 1998

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

Search the Archive

Re: Copying from Excel 97



Lawrence Walker wrote:
> 
> Hi,
> 
> 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.
> 
> For instance, given the following block of numbers in Excel (each in
> different cells):
> 
>     1    2   3
>     4    5   6
>     7    8   9
> 
> If I copied the block and paste it into Mathematica then I would get...
> 
> 1 2 34 5 67 8 9
> 
> After which I would have to edit the entry with separators.
> 
> {1, 2, 3,4, 5, 6,7, 8, 9}
> 
> For this case it was easy, but for large blocks of number this gets
> somewhat confusing.
> How do I prevent Mathematica or Excel from forcing numbers to run
> together?
> 
> Thanks,
> Lawrence


You will probably not be able to cut and paste via the clipboard.  You
will need to read and write files using Write and ReadList.  You may
even need to massage the data by converting it into a string (ToString)
and manipulating it to get the commas and return characters in the
correct place for Excel before writing it.  You may also need to read
it in as a string and manipulate it to get the brackets in the correct
place then convert it to a list with ToExpression. -- 
Remove the _nospam_ in the return address to respond.



  • Prev by Date: Re: Help coloring plot
  • Next by Date: Re: Computing my own function efficiently
  • Prev by thread: Copying from Excel 97
  • Next by thread: RE: Copying from Excel 97