| 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_] :=
Module[{},
(* section creation *)
NotebookWrite[notebook,
{
Cell[data[[1]], "Section", CellFrame -> True, Background ->
RGBColor[.7, .9, .7], FontSize -> 30.],
Cell[ToString[
data[[2]]], "Text", CellFrame ->
False, Background -> GrayLevel[.9]]
}
]
]
Then
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.
Daniele
URL: , |
|