Screencast: Using ERExcelLook

Project Wonder’s ERExcelLook is a framework that leverages Direct To Web and the ExcelGenerator framework to easily generate Excel exports. I just finished a short screencast on adding it to an existing project. The topics covered are:

  • Adding Direct To Web to an existing project
  • Adding and action to trigger an .xls export for an array of entities
  • Creating a new model file
  • Modifying the rules

Links for the screencast:

  • There is an archive of the completed sample project available here.
  • The project is based on the Movies database, and a MySQL dump is available here.
  • The Rule Modeler tool used in the screencast can be found here.
  • The screencast itself can be found here.

I hope you enjoy it, let me know what you think.

Update: Dave Holt points out that you can specify the worksheet name by adding it in parenthesis as the first item in your displayPropertyKeys array. i.e:

(
    "(WorksheetName)",
    "title",
    "dateReleased",
    "category",
    "studio.name"
)

10 thoughts on “Screencast: Using ERExcelLook

  1. ‘WorksheetName’ is just an arbitrary example Paul. You would supply the name you wanted.

  2. I tried the “(mySheetName)” to set the worksheet name. But I got a Cast Exception. 🙁

  3. What kind of Class Cast Paul? And can you confirm that the parenthasis are inside the quotes: “(mySheetName)” not out side: ( “mySheetName” )

  4. Now it is not doing a cast exception, but it is not working either.

    (
    “(TestEvaluationResults)”,
    “teacher.lastname”,
    “teacher.firstname”,
    “evaluator.lastname”,
    “evaluator.firstname”,
    “dateCreated”
    )

    Also, I’m getting this on text field.
    INFO er.excel.EGSimpleTableParser (ListExcelEvaluation) – java.text.ParseException: The character L in the string Lastname is not a valid character for a number with a pattern of 0.00;-;-0.00

  5. Hi Paul,
    I was getting weird exceptions last week as well. I updated to the latest Wonder and cleaned and rebuilt my project and model and now it is working again. The rule files are very finicky.

  6. Played around with this and finally got some older models to work with it. It appears that one needs to definitely be using a full Wonder project (Application extends ERXApplication, Session extends ERXSession, etc), as well as your model extending _WonderEntity.java before the Direct2Web Wonder stuff will work. I had extra problems with my model groups as they extend pre-existing models (GVCSecurity) that won’t necessarily play well with Wonder unless also updated.

  7. Great screencast! But of course, it’s not actually working for me. I created a model file, saved it in resources, told it which keys to use, and ran it. Unfortunately, I am getting a “missing key” exception for the key “dateLastModified” even though that key is not in my EO, in the concrete class, or in the model file. There is such a key in a class that this EO is related to, but not in the class I am attempting to display.

    I am attempting to display data pulled from the relationship, but not that key.

    I assume I am missing something?

Comments are closed.