Re: How to make Excel import symbolically
- To: mathgroup at smc.vnet.net
- Subject: [mg127024] Re: How to make Excel import symbolically
- From: David Reiss <dbreiss at gmail.com>
- Date: Sun, 24 Jun 2012 04:27:52 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <js15g0$kh4$1@smc.vnet.net>
The reason why you get a list with a matrix in it is because
Mathematica imports the multiple sheets of an Excel file as a list
with each element in the list containing the data from each respective
sheet in the Excel file.
So what you got was a list will one entry in it (because your Excel
file only had one sheet in it), and that entry is the matrix of the
data that you are interested in. To get that first element of the
list you just access it in one of the many ways suggested by the
answers already posted.
The simplest method, for your particular case is just
First[{{{aa, bb},{cc, dd}}}]
Which gives
{{aa, bb},{cc, dd}}
But, more importantly, it is now time for you to read the
documentation and learn about lists and the manipulation of them The
Documentation Center is the place to start...
Best,
David
On Jun 22, 3:05 am, Matti <matti_overm... at yahoo.se> wrote:
> Hi!
> I am new to Mathematica 8 Home (Win 7 64) so I would be grateful for some help.
>
> I am trying to import a matrix symbolically from Excel 2010 so that I can manipulate it further on.
>
> I.e in Excel
> aa bb
> cc dd
>
> When I use the Import command I get
>
> {{{aa, bb},{cc, dd}}}
>
> This is not an matrix, it's something else (I don't know what).
>
> 1. Can I import the symbolic matrix in one operation? or
> 2. Can I transform the {{{...}}} to a {{...}}?
>
> TIA Matti