Kbase P17312: How to sent an Excel output with Embedded Speed script objects?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  14/10/2004 |
|
Status: Unverified
GOAL:
How to sent an Excel output with Embedded Speed script objects?
FACT(s) (Environment):
Webspeed 3.x
FIX:
Let the browser to redirect to XML page including apropiate JavaScript code in
your page:
<html>
<head>
</head>
<body>
<script language=SpeedScript>
IF get-value("output") = "Excel" THEN do:
/* this javascript will make the browser to redirect to excel.htm page */
{&out} '<script language=javascript>' skip.
{&out} 'document.location="' + AppURL + "/excel.htm" + '";' skip.
{&out} '<~/script>' skip.
return no-apply .
END. /* excel output */
else do:
run browser.htm .
return no-apply .
END. /* browser output */
</script>
<form method="Post">
Select Output Destination:<br>
<INPUT TYPE=RADIO NAME="output" value="Browser" CHECKED>Browser <br>
<INPUT TYPE=RADIO NAME="output" value="Excel" CHECKED>Excel <br>
<INPUT TYPE=SUBMIT NAME="Action" VALUE="Process">
</form>
</body>
</html>
excel.htm page is loaded in Excel by the browser by indicating the content-type.
This can be done:
- in cgi-wrappers by running output-content-type( "application/x-msexcel" )
- Embedded speed script objects using META tag
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="application/x-msexcel">
</HEAD>
FIX:
</HEAD>