I don't know about BIRT, but I recently did an output to Excel page.  You
link to it like any other page:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns:wicket="http://wicket.apache.org/";>
<head>
<title>Auction Excel Download</title>
<meta http-equiv="Content-Type" content="application/x-msexcel">
<meta http-equiv="Content-disposition": attachment; filename="catalog.xls">
</head>
<body>
<table>
<tr wicket:id="rows">
<td wicket:id="id">&nbsp;</td>
<td wicket:id="member.id">&nbsp;</td>
<td wicket:id="name">&nbsp;</td>

That meta content in the head is more for documentation - it doesn't seem to
work without the final step below:

The Java code looks something like this to populate the table:

add(new DataView("rows", new MyDataProvider()) {
public void populateItem(final Item item) {
item.setModel(new CompoundPropertyModel(new
DetachableXYZModel(item.getModelObject())));
item.add(new Label("name"));

And the final magic makes it ask if you want to open it with excel:

@Override
protected void configureResponse() {
super.configureResponse();
getRequestCycle().getResponse().setContentType("application/x-msexcel");
}

That worked for me - hope it helps.  (Also note you can output a mix of
literal data and formulas)

I use web app to collect data, then word merge templates for reports.

-- Jim Pinkham
http://firstuucolumbus.org/auction

On Wed, Dec 31, 2008 at 10:22 AM, newbieabc <newbie...@yahoo.com> wrote:

> The generation of the excel report.
> I am really new to BIRT and wicket..
> I've created the BIRT report (report.rptdesign)(in eclipse) but need it to
> be output as xls.
> I'd really appreciate some help.
> Thank you
>
>
> reiern70 wrote:
> >
> > Sure you can... Which part is giving you problems? The generation of the
> > excel report with BIRT? Or the creation of the link?
> >
> > Best,
> >
> > Ernesto
> >
> > newbieabc wrote:
> >> Hello..
> >> How can create a download link on a webpage, that converts a BIRT report
> >> to
> >> excel format and downloads to client machine?
> >>
> >> Thank you.
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
> >
>
>
> -- View this message in context:
> http://www.nabble.com/DownloadLink%2C-BIRT-report-tp21218997p21232850.html
>
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
>
>  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For
> additional commands, e-mail: users-h...@wicket.apache.org
>
>
>

Reply via email to