MathGroup Archive 2012

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

Search the Archive

Re: How to make Excel import symbolically

  • To: mathgroup at
  • Subject: [mg127024] Re: How to make Excel import symbolically
  • From: David Reiss <dbreiss at>
  • Date: Sun, 24 Jun 2012 04:27:52 -0400 (EDT)
  • Delivered-to:
  • References: <js15g0$kh4$>

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


On Jun 22, 3:05 am, Matti <matti_overm... at> 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

  • Prev by Date: Re: Integration anomaly?
  • Next by Date: Re: NDSolve profiling
  • Previous by thread: Re: How to make Excel import symbolically
  • Next by thread: Comparison of Contour Plots between Various Programs