MathGroup Archive 2009

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

Search the Archive

Re: Export to Excel without the brackets {}

  • To: mathgroup at smc.vnet.net
  • Subject: [mg101616] Re: Export to Excel without the brackets {}
  • From: Armand Tamzarian <mike.honeychurch at gmail.com>
  • Date: Fri, 10 Jul 2009 23:26:10 -0400 (EDT)
  • References: <h3763p$f62$1@smc.vnet.net>

On Jul 10, 5:45 am, Andy <lars1... at umn.edu> wrote:
> Hi, Do you know how to export a Mathematica table to Excel without
> getting the brackets {} around the data inside of each Excel cell?
> Thanks.

the depth of your list must be greater than the depth of the
spreadsheet. In other words if you applied MatrixForm to your list one
or more of the elements would appear as a list.

Without knowing the structure of your list and the sort of things your
list elements are I can only offer a guess at a way to get what you
want:

One way would be to convert the lists appearing in your excel
spreadsheet to strings. If the following list is exported to excel

mylist = {1, {1, 2, 3, 4}, 3, 4, 5}

one of the cells will show {1,2,3,4}

mylist =mylist /. {x___, y : {___}, z___} :> {x, StringTake[ToString
[y], {2, -2}], z}

the excel cell will now show as 1,2,3,4 but of course it is now right
indented. Need more information from you to come up will a better
solution.

Mike


  • Prev by Date: Re: Symbolic summation
  • Next by Date: Re: Symbolic summation
  • Previous by thread: Re: Export to Excel without the brackets {}
  • Next by thread: Re: Jens-Peer Kuska-> honor his memory too!