According to the Displaytag 1.2 documentation, ExportView
is provided to output Excel files.
But actually, the source code shows that the entire Excel Model structure is just a plain data bean of strings. The result of using ExcelView
to output an XLS is the following plain-text output (not a valid XLS),
"Agreement Category" "Approving Official" "Second Level Approving Official"
"Regular" "John Smith" "Test"
Indeed, the ExcelView
Model package is just a String-based set of classes, like a POJO bean,
org.displaytag.model.Column
org.displaytag.model.HeaderCell
...
I understand that Displaytag also has a completely different renderer, org.displaytag.export.excel.DefaultHssfExportView
, which uses HSSF to write XLS files. That renderer does produce a valid Excel file. (It's in the JAR displaytag-export-poi-1.2.jar.)
So what's the purpose of ExcelView
, then? Is it a final renderer, or just an interface renderer of some kind? Does it assume more implementation? Why call it ExcelView
if it doesn't actually output Excel, just a String list? Are we supposed to use DefaultHssfExportView
for all Excel exports?