Re: Copying data from Excel into Mathematica 6.01
- To: mathgroup at smc.vnet.net
- Subject: [mg84975] Re: Copying data from Excel into Mathematica 6.01
- From: Szabolcs Horvát <szhorvat at gmail.com>
- Date: Mon, 21 Jan 2008 06:58:50 -0500 (EST)
- References: <fn1nqr$9hs$1@smc.vnet.net>
Lea Rebanks wrote: > Dear All, > > I tried copying the data list below from a column in Excel into Mathematica > 6.01 on a PC. [data removed] > The paste resulted in the above data, same format, in Mathematica. > > I wanted to convert this data set into a list for Mathematica. E.G > {101.3099325, 102.7643897, 108.4349488, .....etc } > > I know I could import the data file from Excel in CSV format. But was > wondering if there was an easier way to 'Copy & Paste' this. Or some other > simple process. > Hi, This is a hack, but it works, and it's simpler than saving to a file first: 1. Paste the data in the same format that you used in this message. 2. Enclose it in quotes 3. Use ImportString[]: ImportString["101.3099325 102.7643897 108.4349488 112.5 113.1985905 116.5650512 119.0546041 119.4173379 120.9637565 122.2356103 122.4711923 123.6900675 124.6951535 124.8501001 125.5376778 126.1387073 126.2538377 126.8698976 127.8749837 128.0230927 128.6598083 129.1903943 129.2894069 129.8055711", "List"] -- Szabolcs