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


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

Re: Export list to Excel without brackets

From Chris Degnen <degnen@cwgsy.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Export list to Excel without brackets
Date 2011-10-29 11:08 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j8gmr2$52u$1@smc.vnet.net> (permalink)
References <j7jorq$8nq$1@smc.vnet.net> <j7m5kl$jkp$1@smc.vnet.net> <j8dt75$kdn$1@smc.vnet.net>

Show all headers | View raw


Just add quotes, with backslash to elide interpretation:

list={{{1.27,1.12,1.00,0.90,0.83},{0.27,0.12,0.00,-0.10,-0.17},
     {0.66,0.56,0.49,0.43,0.38},{0.72,0.57,0.49,0.44,0.42}},
     {{1.09,1.03,0.97,0.93,0.89},{0.09,0.03,-0.03,-0.07,-0.11},
     {0.27,0.25,0.23,0.21,0.20},{0.29,0.25,0.23,0.22,0.23}}};

Export["C:\\Documents and Settings\\username\\My Documents\\list.csv",
   Insert[Flatten[Map[Transpose,list],1],{},6]];
Run["start excel \"C:\\Documents and Settings\\username\\My Documents\
\list.csv\""];


On Oct 28, 10:38 am, paul <paulvonhip...@yahoo.com> wrote:
> On Oct 19, 4:35 am, Chris Degnen <deg...@cwgsy.net> wrote:
> > On Oct 18, 12:44 pm, paul <paulvonhip...@yahoo.com> wrote:
>
> > > Like a previous poster, I would like toexportalisttoExcel. Here
> > > is mylist:
> > > {{{1.27,1.12,1.00,0.90,0.83},{0.27,0.12,0.00,-0.10,-0.17},
> > > {0.66,0.56,0.49,0.43,0.38},{0.72,0.57,0.49,0.44,0.42}},
> > > {{1.09,1.03,0.97,0.93,0.89},{0.09,0.03,-0.03,-0.07,-0.11},
> > > {0.27,0.25,0.23,0.21,0.20},{0.29,0.25,0.23,0.22,0.23}}}
>
> > > I would like it to arrive inExcelin this layout:
>
> > > 1.27    0.27    0.66    0.72
> > > 1.12    0.12    0.56    0.57
> > > 1.00    0.00    0.49    0.49
> > > 0.90    -0.10   0.43    0.44
> > > 0.83    -0.17   0.38    0.42
>
> > > 1.09    0.09    0.27    0.29
> > > 1.03    0.03    0.25    0.25
> > > 0.97    -0.03   0.23    0.23
> > > 0.93    -0.07   0.21    0.22
> > > 0.89    -0.11   0.20    0.23
>
> > > Suggestions welcome.
>
> > One simple way is this:
>
> > list={{{1.27,1.12,1.00,0.90,0.83},{0.27,0.12,0.00,-0.10,-0.17},
> >      {0.66,0.56,0.49,0.43,0.38},{0.72,0.57,0.49,0.44,0.42}},
> >      {{1.09,1.03,0.97,0.93,0.89},{0.09,0.03,-0.03,-0.07,-0.11},
> >      {0.27,0.25,0.23,0.21,0.20},{0.29,0.25,0.23,0.22,0.23}}};
>
> > Export["c:\\temp\\list.csv",Insert[Flatten[Map[Transpose,list],1],{},
> > 6]];
> > Run["startexcelc:\\temp\\list.csv"];
>
> Very helpful, thank you! This works well until I try to write to a
> filename whose path name contains spaces. Any suggestions?

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


Thread

Export list to Excel without brackets paul <paulvonhippel@yahoo.com> - 2011-10-18 11:44 +0000
  Re: Export list to Excel without brackets Chris Degnen <degnen@cwgsy.net> - 2011-10-19 09:35 +0000
    Re: Export list to Excel without brackets paul <paulvonhippel@yahoo.com> - 2011-10-28 09:38 +0000
      Re: Export list to Excel without brackets Chris Degnen <degnen@cwgsy.net> - 2011-10-29 11:08 +0000
      Re: Export list to Excel without brackets A Retey <awnl@gmx-topmail.de> - 2011-10-29 11:25 +0000

csiph-web