ERExcelLook-specific Rules

For quick reference:

1. How do I change the default name of the downloadable spreadsheet?

100: pageConfiguration = 'ListExcelFooBar' => excelFileName = "FooBar Report" [Assignment]

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:

 
100: pageConfiguration = 'ListExcelFooBar' => excelFileName = "session.excelFileName" [ERDDelayedKeyValueAssignment]

2. How do I customize the columns that will appear within the downloadable spreadsheet?

100 : pageConfiguration = 'ListExcelPerson' => displayPropertyKeys = (familyName, givenName,"currentContactAddress.address1",
 "currentMContactAddress.address2", "currentContactAddress.city", "currentContactAddress.province", "currentContactAddress.postalCode",
 "currentContactAddress.country", "currentContactAddress.email") [com.webobjects.directtoweb.Assignment]

3. How do I customize the titles used by the columns that will appear on the downloadable spreadsheet?

100 : pageConfiguration = 'ListExcelPerson' and propertyKey like '*address1' => displayNameForProperty = "Street Address" [com.webobjects.directtoweb.Assignment]

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

100 : pageConfiguration = 'ListExcelPerson' => displayPropertyKeys = ("(Contact List)", familyName, givenName,
"currentContactAddress.address1", "currentMContactAddress.address2", "currentContactAddress.city", "currentContactAddress.province", 
"currentContactAddress.postalCode", "currentContactAddress.country", "currentContactAddress.email") [com.webobjects.directtoweb.Assignment]

Alternately: You can use the key excelSheetName and assign it a value using a rule similar to tip 1

100: pageConfiguration = 'ListExcelFooBar' => excelSheetName = "session.myExcelSheetName" [ERDDelayedKeyValueAssignment]

5. How do I display email addresses in the downloadable spreadsheet?

100 : propertyKey like '*email' => componentName = "ERD2WDisplayString" [com.webobjects.directtoweb.Assignment]

6. How do I use ERExcelLook when Click to Open is enabled? (Note the low priority number) This disables ClickToOpen for these Excel pages only

10 : pageConfiguration like '*Excel' => clickToOpenEnabled = "false" [com.webobjects.directtoweb.BooleanAssignment]