Version 10.1 by David LeBer on 2009/10/03 11:15

Show last authors
1 === ERExcelLook-specific Rules ===
2
3 ==== For quick reference: ====
4
5 ~1. How do I change the default name of the downloadable spreadsheet?
6
7 {{noformat}}
8
9
10 100: pageConfiguration = 'ListExcelFooBar' => excelFileName = "FooBar Report" [Assignment]
11
12
13 {{/noformat}}
14
15 If you want the excelFileName to be dynamic (i.e. pulled from a value in your code) you can use ERDDelayedKeyValueAssignment to assign its value from a keypath:
16
17 {{noformat}}
18
19
20 100: pageConfiguration = 'ListExcelFooBar' => excelFileName = "session.excelFileName" [ERDDelayedKeyValueAssignment]
21
22
23 {{/noformat}}
24
25
26
27 2. How do I customize the columns that will appear within the downloadable spreadsheet?
28
29 {{noformat}}
30
31
32 100 : pageConfiguration = 'ListExcelPerson' => displayPropertyKeys = (familyName, givenName,"currentContactAddress.address1",
33 "currentMContactAddress.address2", "currentContactAddress.city", "currentContactAddress.province", "currentContactAddress.postalCode",
34 "currentContactAddress.country", "currentContactAddress.email") [com.webobjects.directtoweb.Assignment]
35
36
37 {{/noformat}}
38
39 3. How do I customize the worksheet names within the downloadable spreadsheet? You can specify the worksheet name by adding it in parenthesis as the first item in your displayPropertyKeys array. i.e: "Contact List" for the rule below
40
41 {{noformat}}
42
43
44 100 : pageConfiguration = 'ListExcelPerson' => displayPropertyKeys = ("(Contact List)", familyName, givenName,
45 "currentContactAddress.address1", "currentMContactAddress.address2", "currentContactAddress.city", "currentContactAddress.province",
46 "currentContactAddress.postalCode", "currentContactAddress.country", "currentContactAddress.email") [com.webobjects.directtoweb.Assignment]
47
48
49 {{/noformat}}
50
51 Alternately: You can use the key excelSheetName and assign it a value using a rule similar to tip 1
52
53 {{noformat}}
54
55
56 100: pageConfiguration = 'ListExcelFooBar' => excelSheetName = "session.myExcelSheetName" [ERDDelayedKeyValueAssignment]
57
58
59 {{/noformat}}