Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #10620

Re: How to make Excel import symbolically

From David Reiss <dbreiss@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: How to make Excel import symbolically
Date 2012-06-24 08:27 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <js6j1d$883$1@smc.vnet.net> (permalink)
References <js15g0$kh4$1@smc.vnet.net>

Show all headers | View raw


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...@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

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

How to make Excel import symbolically Matti <matti_overmark@yahoo.se> - 2012-06-22 07:05 +0000
  Re: How to make Excel import symbolically DC <b.gatessucks@gmail.com> - 2012-06-23 08:27 +0000
  Re: How to make Excel import symbolically "Nasser M. Abbasi" <nma@12000.org> - 2012-06-23 08:23 +0000
  Re: How to make Excel import symbolically David Reiss <dbreiss@gmail.com> - 2012-06-24 08:27 +0000

csiph-web