Wiki source code of Additional tips for ERExcelLook
Version 8.1 by David Holt on 2010/02/19 19:25
Show last authors
author | version | line-number | content |
---|---|---|---|
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 titles used by the columns that will appear on the downloadable spreadsheet? | ||
40 | |||
41 | {{noformat}} | ||
42 | |||
43 | |||
44 | 100 : pageConfiguration = 'ListExcelPerson' and propertyKey like '*address1' => displayNameForProperty = "Street Address" [com.webobjects.directtoweb.Assignment] | ||
45 | |||
46 | |||
47 | {{/noformat}} | ||
48 | |||
49 | 4. 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 | ||
50 | |||
51 | {{noformat}} | ||
52 | |||
53 | |||
54 | 100 : pageConfiguration = 'ListExcelPerson' => displayPropertyKeys = ("(Contact List)", familyName, givenName, | ||
55 | "currentContactAddress.address1", "currentMContactAddress.address2", "currentContactAddress.city", "currentContactAddress.province", | ||
56 | "currentContactAddress.postalCode", "currentContactAddress.country", "currentContactAddress.email") [com.webobjects.directtoweb.Assignment] | ||
57 | |||
58 | |||
59 | {{/noformat}} | ||
60 | |||
61 | Alternately: You can use the key excelSheetName and assign it a value using a rule similar to tip 1 | ||
62 | |||
63 | {{noformat}} | ||
64 | |||
65 | |||
66 | 100: pageConfiguration = 'ListExcelFooBar' => excelSheetName = "session.myExcelSheetName" [ERDDelayedKeyValueAssignment] | ||
67 | |||
68 | |||
69 | {{/noformat}} | ||
70 | |||
71 | 5. How do I display email addresses in the downloadable spreadsheet? | ||
72 | |||
73 | {{noformat}} | ||
74 | |||
75 | |||
76 | 100 : propertyKey like '*email' => componentName = "ERD2WDisplayString" [com.webobjects.directtoweb.Assignment] | ||
77 | |||
78 | |||
79 | {{/noformat}} | ||
80 | |||
81 | 5. How do I use ERExcelLook when [[WOL:Click to Open]] is enabled? (Note the low priority number) This disables ClickToOpen for these Excel pages only | ||
82 | |||
83 | {{noformat}} | ||
84 | |||
85 | |||
86 | 10 : pageConfiguration like '*Excel' => clickToOpenEnabled = "false" [com.webobjects.directtoweb.BooleanAssignment] | ||
87 | |||
88 | |||
89 | {{/noformat}} |