Re: Copying from Excel 97
- To: mathgroup@smc.vnet.net
- Subject: [mg11286] Re: [mg11232] Copying from Excel 97
- From: Sean Ross <seanross@worldnet.att.net>
- Date: Wed, 4 Mar 1998 01:39:39 -0500
- References: <199803030411.XAA02308@smc.vnet.net.>
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.
- References:
- Copying from Excel 97
- From: Lawrence Walker <lwalker701@earthlink.net>
- Copying from Excel 97