Today, somebody asked me if Relatorio could generate sheets (aka tabs) dynamically. We had never done so and I did not know if it would work. It turns out it works nicely out of the box. The trick is to create a sheet with a <relatorio://for each="xxx"> link, then the sheet(s) you want repeated, then an empty sheet with only a <relatorio:///for> link.
Unfortunately, the name of the sheets created this way cannot be set dynamically so far. Instead, the first sheet so create will have the name of the repeated sheet and subsequent sheets will be named automatically by OpenOffice: TableXX
If anybody want to try it for himself, I've added a demo of sheet looping to the examples directory of Relatorio...
Comments
Ups, some parts of my last message were filtered...
Sheet 0:
Link: relatorio://for each="model in object"
Sheet 1:
* right click on sheet title -> Rename
give it the name: ${model.name}
* Here I use the genshi construct ${NAME} instead of a link, because I can not create a link in a sheet title.
Sheet 2:
Link: relatorio:///for