MathGroup Archive 2007

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

Search the Archive

Re: Reading excel data

  • To: mathgroup at
  • Subject: [mg83786] Re: Reading excel data
  • From: Bill Rowe <readnewsciv at>
  • Date: Fri, 30 Nov 2007 05:26:24 -0500 (EST)

On 11/29/07 at 6:33 AM, boydkramer at (DBK) wrote:

>I have generated a "dat" file from a mathematica simulation. I then
>brought the data back into Mathematica to graph using the code
>below. All of this worked fine. Then, when I did a few manipulations
>in excel on the "dat" file (adding a column of data) and resaved the
>file as a tab delimited file as it was before my manipulations, the
>code below does not work. I get the following error messages.

>Transpose::nmtx: The first two levels of the one-dimensional list
>cannot be transposed Part::partw: Part All of the Transpose... does
>not exist.

>I did not manipulate at all the first two columns of the "dat"
>spreadsheet which I am trying to read. So, excel has changed the
>file structure in some way that prevents mathematica from reading
>it. Any thoughts?

>base = Transpose[
>ReadList["baseline.dat",  Number, RecordLists -> True]][[{1, 2},
>base = Transpose[base]; ListLinePlot[base]

What is the structure of the data in "baseline.dat"?

The [[{1,2},All]] will grab the first two rows and all columns
of the data in "baseline.txt". Is that the structure? That is
you have multiple columns and only want the first two rows?

Perhaps you meant to get the first two columns in
"baseline.dat". If so, the [[{1,2},All]] should be [[All,{1,2}]]

Do you get what you expect if you do

To reply via email subtract one hundred and four

  • Prev by Date: Re: "vector" Map[] / functional outer product?
  • Next by Date: Re: Recursive function
  • Previous by thread: Reading excel data
  • Next by thread: How do I let them know about a bug ?