MathGroup Archive 2007

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

Search the Archive

Re: Exporting TableHeadings to Excel

  • To: mathgroup at smc.vnet.net
  • Subject: [mg77004] Re: Exporting TableHeadings to Excel
  • From: Szabolcs <szhorvat at gmail.com>
  • Date: Thu, 31 May 2007 03:33:54 -0400 (EDT)
  • Organization: University of Bergen
  • References: <f3jh42$dd6$1@smc.vnet.net>

Dean Williams wrote:
> Using the example below, I am trying to export the TableHeadings to
> accompany the data into Excel.
> 
> However, when I open Excel, the TableHeadings are lost.
> 
> Is there a way to export the TableHeadings and data together?
> 
> Regards
> 
> Dean
> 
> 
> data = {{"Item1", 1, 2}, {"Item2", 3, 4}}
> 
> aa = TableForm[data,
>   TableHeadings -> {None, {"Item", "Heading1", "Heading2"}}]
> 
> Export["testxls.xls", aa]
> 
> 

A workaround is to directly Prepend the heading to the table.
Export["data.xls", Prepend[data, {"Item", "Heading1", "Heading2"}]]


  • Prev by Date: real world solutions for a fractional permutation
  • Next by Date: Analogue of MousePosition[] for the state of keyboard keys
  • Previous by thread: Exporting TableHeadings to Excel
  • Next by thread: Re: Exporting TableHeadings to Excel