Read and respond to this message at: 
https://sourceforge.net/forum/message.php?msg_id=2965847
By: acastro2703

I wrote a class (WordView) to export the table to MS Word (actually, what i
need is just to generate the table and then save it with a .doc extension...
I know word recognize it when I open the resulting document...)

The problem is that the file is generated but it only writes an empty table
to the document. None of the values, for the headers nor the rows are printed
in the generated document.

Here's the code of the WordView

public String getMimeType() {
  return "application/msword";
}

protected String getDocumentStart() {
  return "<html><table>";
}

protected String getDocumentEnd() {
  return "</table></html>";
}

protected String getRowStart() {
  return "<tr>";
}

protected String getRowEnd() {
  return "</tr>";
}

protected String getCellStart() {
  return "<td>";
}

protected String getCellEnd() {
  return "</td>";
}

protected boolean getAlwaysAppendCellEnd() {
  return true;
}

protected boolean getAlwaysAppendRowEnd() {
  return true;
}

protected String escapeColumnValue(Object value) {
  return (value == null) ? null : "";
}

============
Now, this is displaytag.properties
export.types=csv excel xml word
export.word.class=com.rlm.util.displaytag.WordView
export.word.label=Word
export.word.include_header=true

=============
then, this is the param on the jsp
<display:setProperty name="export.word.filename"
value="ChangeManagementInquiry.doc"/>

=============
And finally, this is the generated file
<html><table><tr><td></td><td></td></tr><tr><td></td><td></td></tr></table></htm
l>

=============
Why the values are not being printed on the table ??
Thanx for your help...

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit: 
https://sourceforge.net/forum/unmonitor.php?forum_id=249317


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to