Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'Create Table Cell in new notebook' topicStudent Support Forum > General > "Create Table Cell in new notebook"

Next Comment >Help | Reply To Topic
Author Comment/Response
Daniele Lupo
12/10/06 05:12am

Hi to all.

I've a set of data, in the form

{"namedata", {{a1,b1,c1},{a2,b2,c2},...}}

I want to create a new notebook that show in a nice day these data.

First of all, I create the new notebook:

datanb = NotebookCreate[WindowTitle ->
"MyTitle", CellGrouping -> Automatic]

After this, I've tried to create a function that use the name of the data (first elent as string), as name section, and then write the data of second element of my list:

createCellSection[notebook_, data_] :=
(* section creation *)
Cell[data[[1]], "Section", CellFrame -> True, Background ->
RGBColor[.7, .9, .7], FontSize -> 30.],
data[[2]]], "Text", CellFrame ->
False, Background -> GrayLevel[.9]]


createCellSection[datanb, data]

works fine, but, for the data, I've a string: instead I want a table of them. I want something like

name1 name2 name3

a1 b1 c1
a2 b2 c2
a3 b3 c3

where name1, name2, name3 are written by me (they're not on the data).
How can I create a cell like this, using my data?

And another question... When I create this notebook, how can I close all cell subgroups?

Thanks for answers.


URL: ,

Subject (listing for 'Create Table Cell in new notebook')
Author Date Posted
Create Table Cell in new notebook Daniele Lupo 12/10/06 05:12am
Re: Create Table Cell in new notebook yehuda ben-s... 12/11/06 10:18pm
Re: Create Table Cell in new notebook Daniele Lupo 12/15/06 05:04am
Next Comment >Help | Reply To Topic