Re: Open wo rendered page in excel
Re: Open wo rendered page in excel
- Subject: Re: Open wo rendered page in excel
- From: Denis Stanton <email@hidden>
- Date: Thu, 8 Jan 2004 14:29:35 +1300
Hi Alex
This seemed like such a useful idea that I tried it immediately.
Unfortunately I seem to have struck a glitch and I wonder if you could
point out what I'm doing wrong. Or maybe I just have the wrong
expectation.
I followed your instructions below and sure enough when I click the
link for the new page Safari downloads a file named Denis.csv. The
file has lines with values delimited by commas. Looks promising
The odd part is Excel doesn't want anything to do with my file. I
rather hoped Safari might nudge Excel into opening it. When that
didn't happen I double-clicked the file in the finder. It says it
can't find any suitable application, so I help out by by navigating to
my applications folder where I find I can choose any application EXCEPT
Excel. Excel is greyed out. Word, or even PowerPoint are available
choices, but not Excel. If I drag my .csv file to the Excel icon in
the dock it doesn't want to know. I can open it with BBEdit though.
If I start Excel and then use File / Open to locate the .csv file it is
again greyed out, though many other files are accessible.
Can you hazard a guess at what I have done to make my .csv file
unaccessible to Excel?
I'm using Max OS X 10.3.2, and Excel:Mac vX
Denis
On Thursday, January 8, 2004, at 05:01 AM, Williams, Alex wrote:
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.
Denis Stanton
email@hidden
Home: +64 9 533 0391
mobile: +64 21 1433622
_______________________________________________
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.