RE: Open wo rendered page in excel
RE: Open wo rendered page in excel
- Subject: RE: Open wo rendered page in excel
- From: "Williams, Alex" <email@hidden>
- Date: Wed, 7 Jan 2004 16:01:58 -0000
Hi Paul,
If you're just wanting to display simple tabular data in excel, you can
return the values in csv format (comma separated). One way would be...
Create a new WOComponent.
In the page inspector, set "Partial Component" (to remove any HTML).
Insert the appropriate number of WOStrings for your columns with commas in
between.
For each WOString, set escapeHTML=NO.
Wrap the row of WOStrings in a WORepetition.
Set the appropriate bindings on the WOStrings and WORepetition.
Switch to the "HTML" view in WOBuilder.
Put double quotes around each WOString which may contain commas etc in the
value.
Put a carriage return after the last WOString (before the WORepetition's
closing tag).
Add the following to the component's java file:
public void appendToResponse (WOResponse aResponse, WOContext aContext)
{
super.appendToResponse(aResponse, aContext);
aResponse.setHeader ("application/csv", "content-type");
aResponse.setHeader ("filename=Pauls_excel_file.csv",
"content-disposition");
}
If excel is installed on the client, it should already be associated with
.csv files.
Hope that helps,
Alex
-----Original Message-----
From: Paul Mathews [mailto:email@hidden]
Sent: 07 January 2004 14:22
To: email@hidden
Subject: Open wo rendered page in excel
Hi all again
New to WO so still so many questions...
Has anyone tried to open a WO rendered page in Excel? That is taking
data from a database to a WO page, but providing and extra button or
link to open the same page in Excel?
Any pointers many thanks
Paul
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
________________________________________________
This message is confidential. It may also be privileged or
otherwise protected by work product immunity or other legal
rules. If you have received it by mistake please let us know
by reply and then delete it from your system; you should not
copy the message or disclose its contents to anyone. All
messages sent to and from Linklaters may be monitored to
ensure compliance with internal policies and to protect our
business.
Please refer to http://www.linklaters.com/regulation for
important information on the regulatory position of the firm.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.