This repository has been archived by the owner on Nov 10, 2017. It is now read-only.
forked from mareknovotny/jboss-seam
-
Notifications
You must be signed in to change notification settings - Fork 50
/
Excel.xml
3206 lines (3196 loc) · 135 KB
/
Excel.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" standalone="no"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY excel 'the Microsoft® Excel® spreadsheet application'>
<!ENTITY Excel 'The Microsoft® Excel® spreadsheet application'>
]>
<chapter id="excel">
<title>&Excel;</title>
<para>
Seam also supports generation of &excel; spreadsheets through the
excellent <ulink url="http://jexcelapi.sourceforge.net/">JExcelAPI
</ulink> library. The generated document is compatible with
&excel; versions 95, 97, 2000, XP and 2003. Currently a limited
subset of the library functionality is exposed but the ultimate
goal is to be able to do everything the library allows for. Please
refer to the JExcelAPI documentation for more information on
capabilities and limitations.
</para>
<section id="excel.intro">
<title>&Excel; support</title>
<para>
&Excel; <literal>jboss-seam-excel.jar</literal>. This JAR contains
the &excel; JSF controls, which are used to construct views that can
render the document, and the DocumentStore component, which serves
the rendered document to the user. To include &excel; support in
your application, include <literal>jboss-seam-excel.jar</literal>
in your <literal>WEB-INF/lib</literal> directory along with the
<literal>jxl.jar</literal> JAR file. Furthermore, you need to
configure the DocumentStore servlet in your web.xml
</para>
<para>
&Excel; Seam module requires the use of Facelets as the view
technology. Additionally, it requires the use of the seam-ui package.
</para>
<para>
The <literal>examples/excel</literal> project contains an example of
&excel; support in action. It demonstrates proper deployment
packaging, and it shows the exposed functionality.
</para>
<para>
Customizing the module to support other kinds of &excel; spreadsheet
API's has been made very easy. Implement the <literal>ExcelWorkbook
</literal> interface, and register in components.xml.
</para>
<programlisting role="XML"><![CDATA[<excel:excelFactory>
<property name="implementations">
<key>myExcelExporter</key>
<value>my.excel.exporter.ExcelExport</value>
</property>
</excel:excelFactory>]]>
</programlisting>
<para>
and register the excel namespace in the components tag with
</para>
<programlisting role="XML"><![CDATA[xmlns:excel="http://jboss.org/schema/seam/excel"]]></programlisting>
<para>
Then set the UIWorkbook type to <literal>myExcelExporter</literal> and your
own exporter will be used. Default is "jxl", but support for CSV has also been
added, using the type "csv".
</para>
<para>
See <xref linkend="itext.configuration" /> for information on how to configure
the document servlet for serving the documents with an .xls extension.
</para>
<para>
If you are having problems accessing the generated file under IE (especially
with https), make sure you are not using too strict restrictions in the browser,
<!-- (see <ulink url="http://www.nwnetworks.com/iezones.htm"/>) server disappeared? :-o-->
too strict security constraint in web.xml or a combination of both.
</para>
</section>
<section id="excel.usage">
<title>Creating a simple workbook</title>
<para>
Basic usage of the worksheet support is simple; it is used like a
familiar <literal><h:dataTable></literal> and you can bind to a
<literal>List</literal>, <literal>Set</literal>,
<literal>Map</literal>, <literal>Array</literal> or
<literal>DataModel</literal>.
</para>
<programlisting role="XML">
<![CDATA[
<e:workbook xmlns:e="http://jboss.org/schema/seam/excel">
<e:worksheet>
<e:cell column="0" row="0" value="Hello world!"/>
</e:worksheet>
</e:workbook>
]]>
</programlisting>
<para>
That's not terribly useful, so lets have a look at a more common case:
</para>
<programlisting role="XML">
<![CDATA[
<e:workbook xmlns:e="http://jboss.org/schema/seam/excel">
<e:worksheet value="#{data}" var="item">
<e:column>
<e:cell value="#{item.value}"/>
</e:column>
</e:worksheet>
</e:workbook>
]]>
</programlisting>
<para>
First we have the top-level workbook element which serves as the
container and it doesn't have any attributes. The child-element
worksheet has two attributes; value="#{data}" is the
EL-binding to the data and var="item" is the name of the
current item. Nested inside the worksheet is a single column and within
it you see the cell which is the final bind to the data within the
currently iterated item
</para>
<para>
This is all you know to get started dumping your data to worksheets!
</para>
</section>
<section id="excel.workbook">
<title>Workbooks</title>
<para>
Workbooks are the top-level parents of worksheets and stylesheet links.
</para>
<informaltable>
<tgroup cols="2">
<colspec colnum="1" colwidth="1*" />
<colspec colnum="2" colwidth="3*" />
<tbody>
<row>
<entry valign="top">
<para>
<literal><e:workbook></literal>
</para>
</entry>
<entry valign="top">
<para>
<emphasis>Attributes</emphasis>
</para>
<itemizedlist>
<listitem>
<para>
<literal>type</literal>
— Defines which export module to be used. The
value is a string and can be either "jxl" or
"csv". The default is "jxl".
</para>
</listitem>
<listitem>
<para>
<literal>templateURI</literal>
— A template that should be used as a basis
for the workbook. The value is a string (URI).
</para>
</listitem>
<listitem>
<para>
<literal>arrayGrowSize</literal>
— The amount of memory by which to increase
the amount of memory allocated to storing the
workbook data. For processes reading many small
workbooks inside a WAS it might be necessary to
reduce the default size. Default value is 1
megabyte. The value is a number (bytes).
</para>
</listitem>
<listitem>
<para>
<literal>autoFilterDisabled</literal>
— Should autofiltering be disabled?. The
value is a boolean.
</para>
</listitem>
<listitem>
<para>
<literal>cellValidationDisabled</literal>
— Should cell validation be ignored? The
value is a boolean.
</para>
</listitem>
<listitem>
<para>
<literal>characterSet</literal>
— The character set. This is only used when
the spreadsheet is read, and has no effect when
the spreadsheet is written. The value is a string
(character set encoding).
</para>
</listitem>
<listitem>
<para>
<literal>drawingsDisabled</literal>
— Should drawings be disabled? The value is a
boolean.
</para>
</listitem>
<listitem>
<para>
<literal>excelDisplayLanguage</literal>
— The language in which the generated file
will display. The value is a string (two character
ISO 3166 country code).
</para>
</listitem>
<listitem>
<para>
<literal>excelRegionalSettings</literal>
— The regional settings for the generated
excel file. The value is a string (two character
ISO 3166 country code).
</para>
</listitem>
<listitem>
<para>
<literal>formulaAdjust</literal>
— Should formulas be adjusted? The value is a
boolean.
</para>
</listitem>
<listitem>
<para>
<literal>gcDisabled</literal>
— Should garbage collection be disabled? The
value is a boolean.
</para>
</listitem>
<listitem>
<para>
<literal>ignoreBlanks</literal>
— Should blanks be ignored? The value is a
boolean.
</para>
</listitem>
<listitem>
<para>
<literal>initialFileSize</literal>
— The initial amount of memory allocated to
store the workbook data when reading a worksheet.
For processes reading many small workbooks
inside a WAS it might be necessary to reduce the
default size. Default value is 5 megabytes. The
value is a number (bytes).
</para>
</listitem>
<listitem>
<para>
<literal>locale</literal>
— The locale used by JExcelApi to generate
the spreadsheet. Setting this value has no effect
on the language or region of the generated excel
file. The value is a string.
</para>
</listitem>
<listitem>
<para>
<literal>mergedCellCheckingDisabled</literal>
— Should merged cell checking be disabled?
The value is a boolean.
</para>
</listitem>
<listitem>
<para>
<literal>namesDisabled</literal>
— Should handling of names be disabled? The
value is a boolean.
</para>
</listitem>
<listitem>
<para>
<literal>propertySets</literal>
— Should any property sets be enabled (such
as macros) to be copied along with the workbook?
Leaving this feature enabled will result in the
JXL process using more memory. The value is a
boolean.
</para>
</listitem>
<listitem>
<para>
<literal>rationalization</literal>
— Should the cell formats be rationalized
before writing out the sheet? The value is a
boolean. Default is true.
</para>
</listitem>
<listitem>
<para>
<literal>supressWarnings</literal>
— Should warnings be suppressed?. Due to the
change in logging in version 2.4, this will now
set the warning behaviour across the JVM
(depending on the type of logger used). The value
is a boolean.
</para>
</listitem>
<listitem>
<para>
<literal>
temporaryFileDuringWriteDirectory
</literal>
— Used in conjunction with the
<literal>useTemporaryFileDuringWrite</literal>
setting to set the target directory for the
temporary files. This value can be NULL, in which
case the normal system default temporary directory
is used instead. The value is a string (the
directory to which temporary files should be
written).
</para>
</listitem>
<listitem>
<para>
<literal>useTemporaryFileDuringWrite</literal>
— Should a temporary file is used during the
generation of the workbook. If not set, the
workbook will take place entirely in memory.
Setting this flag involves an assessment of the
trade-offs between memory usage and performance.
The value is a boolean.
</para>
</listitem>
<listitem>
<para>
<literal>workbookProtected</literal>
— Should the workbook be protected? The value
is a boolean.
</para>
</listitem>
<listitem>
<para>
<literal>filename</literal>
— The filename to use for the download. The value
is a string. Please note that if you map the DocumentServlet
to some pattern, this file extension must also match.
</para>
</listitem>
<listitem>
<para>
<literal>exportKey</literal>
— A key under which to store the resulting data
in a DocumentData object under the event scope. If used,
there is no redirection.
</para>
</listitem>
</itemizedlist>
<para>
<emphasis>Child elements</emphasis>
</para>
<itemizedlist>
<listitem>
<para>
<literal><e:link/></literal>
— Zero or more stylesheet links (see
<xref linkend="excel.fontsandlayout.link" />
).
</para>
</listitem>
<listitem>
<para>
<literal><e:worksheet/></literal>
— Zero or more worksheets (see
<xref linkend="excel.worksheet" />
).
</para>
</listitem>
</itemizedlist>
<para>
<emphasis>Facets</emphasis>
</para>
<itemizedlist>
<listitem>
<para>
<literal>none</literal>
</para>
</listitem>
</itemizedlist>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<programlisting role="XML">
<![CDATA[
<e:workbook>
<e:worksheet>
<e:cell value="Hello World" row="0" column="0"/>
</e:worksheet>
<e:workbook>
]]>
</programlisting>
<para>defines a workbook with a worksheet and a greeting at A1</para>
</section>
<section id="excel.worksheet">
<title>Worksheets</title>
<para>
Worksheets are the children of workbooks and the parent of columns and
worksheet commands. They can also contain explicitly placed cells,
formulas, images and hyperlinks. They are the pages that make up the
workbook.
</para>
<informaltable>
<tgroup cols="2">
<colspec colnum="1" colwidth="1*" />
<colspec colnum="2" colwidth="3*" />
<tbody>
<row>
<entry valign="top">
<para>
<literal><e:worksheet></literal>
</para>
</entry>
<entry valign="top">
<itemizedlist>
<listitem>
<para>
<literal>value</literal>
— An EL-expression to the backing data. The
value is a string. The target of this expression is
examined for an Iterable. Note that if the target is a Map,
the iteration is done over the Map.Entry entrySet(), so you
should use a .key or .value to target in your references.
</para>
</listitem>
<listitem>
<para>
<literal>var</literal>
— The current row iterator variable name that
can later be referenced in cell value attributes.
The value is a string.
</para>
</listitem>
<listitem>
<para>
<literal>name</literal>
— The name of the worksheet. The value is a
string. Defaults to Sheet# where # is the
worksheet index. If the given worksheet name
exists, that sheet is selected. This can be used
for merging several data sets into a single
worksheet, just define the same name for them
(using
<literal>startRow</literal>
and
<literal>startCol</literal>
to make sure that they don't occupy the same
space).
</para>
</listitem>
<listitem>
<para>
<literal>startRow</literal>
— Defines the starting row for the data. The
value is a number. Used for placing the data in
other places than the upper-left corner
(especially useful if having multiple data sets
for a single worksheet). The defaults is 0.
</para>
</listitem>
<listitem>
<para>
<literal>startColumn</literal>
— Defines the starting column for the data.
The value is a number. Used for placing the data
in other places than the upper-left corner
(especially useful if having multiple data sets
for a single worksheet). The default is 0.
</para>
</listitem>
<listitem>
<para>
<literal>automaticFormulaCalculation</literal>
— Should formulas be automatically
calculated? The value is a boolean.
</para>
</listitem>
<listitem>
<para>
<literal>bottomMargin</literal>
— The bottom margin. The value is a number
(inches).
</para>
</listitem>
<listitem>
<para>
<literal>copies</literal>
— The number of copies. The value is a
number.
</para>
</listitem>
<listitem>
<para>
<literal>defaultColumnWidth</literal>
— The default column width. The value is a
number (characters * 256).
</para>
</listitem>
<listitem>
<para>
<literal>defaultRowHeight</literal>
— The default row height. The value is a
number (1/20 of a point).
</para>
</listitem>
<listitem>
<para>
<literal>displayZeroValues</literal>
— Should zero-values be displayed? The value
is a boolean.
</para>
</listitem>
<listitem>
<para>
<literal>fitHeight</literal>
— The number of pages vertically that this
sheet will be printed into. The value is a number.
</para>
</listitem>
<listitem>
<para>
<literal>fitToPages</literal>
— Should printing be fit to pages? The value
is a boolean.
</para>
</listitem>
<listitem>
<para>
<literal>fitWidth</literal>
— The number of pages widthwise which this
sheet should be printed into. The value is a
number.
</para>
</listitem>
<listitem>
<para>
<literal>footerMargin</literal>
— The margin for any page footer. The value
is a number (inches).
</para>
</listitem>
<listitem>
<para>
<literal>headerMargin</literal>
— The margin for any page headers. The value
is a number (inches).
</para>
</listitem>
<listitem>
<para>
<literal>hidden</literal>
— Should the worksheet be hidden? The value
is a boolean.
</para>
</listitem>
<listitem>
<para>
<literal>horizontalCentre</literal>
— Should the worksheet be centered
horizontally? The value is a boolean.
</para>
</listitem>
<listitem>
<para>
<literal>horizontalFreeze</literal>
— The row at which the pane is frozen
vertically. The value is a number.
</para>
</listitem>
<listitem>
<para>
<literal>horizontalPrintResolution</literal>
— The horizontal print resolution. The value
is a number.
</para>
</listitem>
<listitem>
<para>
<literal>leftMargin</literal>
— The left margin. The value is a number
(inches).
</para>
</listitem>
<listitem>
<para>
<literal>normalMagnification</literal>
— The normal magnification factor (not zoom or
scale factor). The value is a number (percentage).
</para>
</listitem>
<listitem>
<para>
<literal>orientation</literal>
— The paper orientation for printing this
sheet. The value is a string that can be either
"landscape" or "portrait".
</para>
</listitem>
<listitem>
<para>
<literal>pageBreakPreviewMagnification</literal>
— The page break preview magnification factor
(not zoom or scale factors). The value is a number
(percentage).
</para>
</listitem>
<listitem>
<para>
<literal>pageBreakPreviewMode</literal>
— Show page in preview mode? The value is a
boolean.
</para>
</listitem>
<listitem>
<para>
<literal>pageStart</literal>
— The page number at which to commence
printing. The value is a number.
</para>
</listitem>
<listitem>
<para>
<literal>paperSize</literal>
— The paper size to be used when printing
this sheet. The value is a string that can be one
of "a4", "a3", "letter", "legal" etc (see
<ulink
url="http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/format/PaperSize.html">
jxl.format.PaperSize
</ulink>
).
</para>
</listitem>
<listitem>
<para>
<literal>password</literal>
— The password for this sheet. The value is a
string.
</para>
</listitem>
<listitem>
<para>
<literal>passwordHash</literal>
— The password hash - used only when copying
sheets. The value is a string.
</para>
</listitem>
<listitem>
<para>
<literal>printGridLines</literal>
— Should grid lines be printed? The value is
a boolean.
</para>
</listitem>
<listitem>
<para>
<literal>printHeaders</literal>
— Should headers be printed? The value is a
boolean.
</para>
</listitem>
<listitem>
<para>
<literal>sheetProtected</literal>
— Should the sheet be protected (read-only)?
The value is a boolean.
</para>
</listitem>
<listitem>
<para>
<literal>recalculateFormulasBeforeSave</literal>
— Should the formulas be re-calculated when
the sheet is saved? The value is a boolean. Default value is false.
</para>
</listitem>
<listitem>
<para>
<literal>rightMargin</literal>
— The right margin. The value is a number
(inches).
</para>
</listitem>
<listitem>
<para>
<literal>scaleFactor</literal>
— The scale factor for this sheet to be used
when printing. The value is a number (percent).
</para>
</listitem>
<listitem>
<para>
<literal>selected</literal>
— Should the sheet be selected when the
workbook opens? The value is a boolean.
</para>
</listitem>
<listitem>
<para>
<literal>showGridLines</literal>
— Should gridlines be shown? The value is a
boolean.
</para>
</listitem>
<listitem>
<para>
<literal>topMargin</literal>
— The top margin. The value is a number
(inches).
</para>
</listitem>
<listitem>
<para>
<literal>verticalCentre</literal>
— Center vertically? The value is a boolean.
</para>
</listitem>
<listitem>
<para>
<literal>verticalFreeze</literal>
— The row at which the pane is frozen
vertically. The value is a number.
</para>
</listitem>
<listitem>
<para>
<literal>verticalPrintResolution</literal>
— The vertical print resolution. The value is
a number.
</para>
</listitem>
<listitem>
<para>
<literal>zoomFactor</literal>
— The zoom factor. Do not confuse zoom factor
(which relates to the on screen view) with scale
factor (which refers to the scale factor when
printing). The value is a number (percentage).
</para>
</listitem>
</itemizedlist>
<para>
<emphasis>Child elemenents</emphasis>
</para>
<itemizedlist>
<listitem>
<para>
<literal><e:printArea/></literal>
— Zero or more print area definitions (see
<xref linkend="excel.printareatitles" />
).
</para>
</listitem>
<listitem>
<para>
<literal><e:printTitle/></literal>
— Zero or more print title definitions (see
<xref linkend="excel.printareatitles" />
).
</para>
</listitem>
<listitem>
<para>
<literal><e:headerFooter/></literal>
— Zero or more header/footer definitions
(see
<xref linkend="excel.headersfooters" />
).
</para>
</listitem>
<listitem>
<para>
Zero or more worksheet commands (see
<xref linkend="excel.worksheetcommands" />
).
</para>
</listitem>
</itemizedlist>
<para>
<emphasis>Facets</emphasis>
</para>
<itemizedlist>
<listitem>
<para>
<literal>header</literal>— Contents that will
be placed at the top of the data block, above the
column headers (if any).
</para>
</listitem>
<listitem>
<para>
<literal>footer</literal>— Contents that will
be placed at the bottom of the data block, below the
column footers (if any).
</para>
</listitem>
</itemizedlist>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<programlisting role="XML">
<![CDATA[
<e:workbook>
<e:worksheet name="foo" startColumn="1" startRow="1">
<e:column value="#{personList}" var="person">
<f:facet name="header">
<e:cell value="Last name"/>
</f:facet>
<e:cell value="#{person.lastName}"/>
</e:column>
</e:worksheet>
<e:workbook>
]]>
</programlisting>
<para>defines a worksheet with the name "foo", starting at B2.</para>
</section>
<section id="excel.columns">
<title>Columns</title>
<para>
Columns are the children of worksheets and the parents of cells,
images, formulas and hyperlinks. They are the structure that control
the iteration of the worksheet data. See <xref linkend="excel.fontsandlayout.columnsettings"/>
for formatting.
</para>
<informaltable>
<tgroup cols="2">
<colspec colnum="1" colwidth="1*" />
<colspec colnum="2" colwidth="3*" />
<tbody>
<row>
<entry valign="top">
<para>
<literal><e:column></literal>
</para>
</entry>
<entry valign="top">
<para>
<emphasis>Attributes</emphasis>
</para>
<itemizedlist>
<listitem>
<para>
<literal>none</literal>
</para>
</listitem>
</itemizedlist>
<para>
<emphasis>Child elemenents</emphasis>
</para>
<itemizedlist>
<listitem>
<para>
<literal><e:cell/></literal>
— Zero or more cells (see
<xref linkend="excel.cells" />
).
</para>
</listitem>
<listitem>
<para>
<literal><e:formula/></literal>
— Zero or more formulas (see
<xref linkend="excel.formulas" />
).
</para>
</listitem>
<listitem>
<para>
<literal><e:image/></literal>
— Zero or more images (see
<xref linkend="excel.images" />
).
</para>
</listitem>
<listitem>
<para>
<literal><e:hyperLink/></literal>
— Zero or more hyperlinks (see
<xref linkend="excel.hyperlinks" />
).
</para>
</listitem>
</itemizedlist>
<para>
<emphasis>Facets</emphasis>
</para>
<itemizedlist>
<listitem>
<para>
<literal>header</literal>
— This facet can/will contain one
<literal><e:cell></literal>
,
<literal><e:formula></literal>
,
<literal><e:image></literal>
or
<literal><e:hyperLink></literal>
that will be used as header for the column.
</para>
</listitem>
<listitem>
<para>
<literal>footer</literal>
— This facet can/will contain one
<literal><e:cell></literal>
,
<literal><e:formula></literal>
,
<literal><e:image></literal>
or
<literal><e:hyperLink></literal>
that will be used as footer for the column.
</para>
</listitem>
</itemizedlist>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<programlisting role="XML">
<![CDATA[
<e:workbook>
<e:worksheet value="#{personList}" var="person">
<e:column>
<f:facet name="header">
<e:cell value="Last name"/>
</f:facet>
<e:cell value="#{person.lastName}"/>
</e:column>
</e:worksheet>
<e:workbook>
]]>
</programlisting>
<para>defines a column with a header and an iterated output</para>
</section>
<section id="excel.cells">
<title>Cells</title>
<para>
Cells are nested within columns (for iteration) or inside worksheets
(for direct placement using the <literal>column</literal> and
<literal>row</literal> attributes) and are responsible for outputting
the value (usually through an EL-expression involving the
<literal>var</literal>-attribute of the datatable. See
<xref linkend="excel.fontsandlayout.cells"/>
</para>
<informaltable>
<tgroup cols="2">
<colspec colnum="1" colwidth="1*" />
<colspec colnum="2" colwidth="3*" />
<tbody>
<row>
<entry valign="top">
<para>
<literal><e:cell></literal>
</para>
</entry>
<entry valign="top">
<para>
<emphasis>Attributes</emphasis>
</para>
<itemizedlist>
<listitem>
<para>
<literal>column</literal>
— The column where to place the cell. The
default is the internal counter. The value is a
number. Note that the value is 0-based.
</para>
</listitem>
<listitem>
<para>
<literal>row</literal>
— The row where to place the cell. The
default is the internal counter. The value is
number. Note that the value is 0-based.
</para>
</listitem>
<listitem>
<para>
<literal>value</literal>
— The value to display. Usually an
EL-expression referencing the var-attribute of the
containing datatable. The value is a string.
</para>
</listitem>
<listitem>
<para>
<literal>comment</literal>
— A comment to add to the cell. The value is
a string.
</para>
</listitem>
<listitem>
<para>
<literal>commentHeight</literal>
— The height of the comment. The value is a
number (in pixels).
</para>