Cerrar Excel con jsp

Julio
27 de Octubre del 2004
<%@ page contentType="application/vnd.ms-excel"%>
<%@ page import="portalcomercial.main.serverclasses.utiles.*" %>
<%@ page import="portalcomercial.main.serverclasses.gddistribucion.servicios.GDD_CID_CON_COM" %>
<%@ page import="portalcomercial.main.serverclasses.gddistribucion.GDDFormato" %>
<%@ page import="portalcomercial.main.serverclasses.iddistribucion.*" %>
<%@ page import="java.util.Vector" %>

<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Excel.Sheet>
<meta name=Generator content="Microsoft Excel 9">
<style>
{mso-displayed-decimal-separator:",";
mso-displayed-thousand-separator:".";}
@page
{margin:0in 0in 0in 0in;
mso-header-margin:0in;
mso-footer-margin:0in;}
tr
{mso-height-source:auto;}
col
{mso-width-source:auto;}
br
{mso-data-placement:same-cell;}
.style0
{mso-number-format:General;
text-align:general;
vertical-align:bottom;
white-space:nowrap;
mso-rotate:0;
mso-background-source:auto;
mso-pattern:auto;
color:windowtext;
font-size:10.0pt;
font-weight:400;
font-style:normal;
text-decoration:none;
font-family:Arial;
mso-generic-font-family:auto;
mso-font-charset:0;
border:none;
mso-protection:locked visible;
mso-style-name:Normal;
mso-style-id:0;}
td
{mso-style-parent:style0;
padding-top:1px;
padding-right:1px;
padding-left:1px;
mso-ignore:padding;
color:windowtext;
font-size:10.0pt;
font-weight:400;
font-style:normal;
text-decoration:none;
font-family:Arial;
mso-generic-font-family:auto;
mso-font-charset:0;
mso-number-format:General;
text-align:general;
vertical-align:bottom;
border:none;
mso-background-source:auto;
mso-pattern:auto;
mso-protection:locked visible;
white-space:nowrap;
mso-rotate:0;}
.xlIzq
{mso-style-parent:style0;
font-family:Arial, sans-serif;
mso-font-charset:0;
background:white;
mso-pattern:auto none;}
.xlCen
{mso-style-parent:style0;
font-family:Arial, sans-serif;
mso-font-charset:0;
text-align:center;
background:white;
mso-pattern:auto none;}
.xlDer
{mso-style-parent:style0;
font-family:Arial, sans-serif;
mso-font-charset:0;
text-align:right;
background:white;
mso-pattern:auto none;}
.xlCabIzq
{mso-style-parent:style0;
font-weight:700;
font-family:Arial, sans-serif;
mso-font-charset:0;
text-align:left;
background:white;
mso-pattern:auto none;}
.xlCabCen
{mso-style-parent:style0;
font-weight:700;
font-family:Arial, sans-serif;
mso-font-charset:0;
text-align:center;
background:white;
mso-pattern:auto none;}
.xlCabDer
{mso-style-parent:style0;
font-weight:700;
font-family:Arial, sans-serif;
mso-font-charset:0;
mso-number-format:0;
text-align:right;
background:white;
mso-pattern:auto none;}
.xlFechaActo
{mso-style-parent:style0;
font-size:11.0pt;
font-weight:700;
font-family:Arial, sans-serif;
mso-font-charset:0;
text-align:right;
background:white;
mso-pattern:auto none;}
.xlTituloActo
{mso-style-parent:style0;
font-size:11.0pt;
font-weight:700;
font-family:Arial, sans-serif;
mso-font-charset:0;
text-align:left;
background:white;
mso-pattern:auto none;}
.xlCabecera
{mso-style-parent:style0;
font-size:12.0pt;
font-weight:700;
font-family:Arial, sans-serif;
mso-font-charset:0;
text-align:left;
background:white;
mso-pattern:auto none;}
.xlTxtIzq
{mso-style-parent:style0;
font-family:Arial, sans-serif;
mso-font-charset:0;
text-align:left;
vertical-align:top;
background:white;
mso-pattern:auto none;}
.xlTxtCen
{mso-style-parent:style0;
font-family:Arial, sans-serif;
mso-font-charset:0;
mso-number-format:0;
text-align:center;
vertical-align:top;
background:white;
mso-pattern:auto none;}
.xlTxtIzqBlanco
{mso-style-parent:style0;
font-family:Arial, sans-serif;
mso-font-charset:0;
text-align:left;
vertical-align:top;
background:white;
mso-pattern:auto none;}
.xlTxtIzqGris
{mso-style-parent:style0;
font-family:Arial, sans-serif;
mso-font-charset:0;
text-align:left;
vertical-align:top;
background:silver;
mso-pattern:auto none;}
.xlTxtCenBlanco
{mso-style-parent:style0;
font-family:Arial, sans-serif;
mso-font-charset:0;
mso-number-format:0;
text-align:center;
vertical-align:top;
background:white;
mso-pattern:auto none;}
.xlTxtCenGris
{mso-style-parent:style0;
font-family:Arial, sans-serif;
mso-font-charset:0;
mso-number-format:0;
text-align:center;
vertical-align:top;
background:silver;
mso-pattern:auto none;}
.xlTxtDer
{mso-style-parent:style0;
font-family:Arial, sans-serif;
mso-font-charset:0;
mso-number-format:0;
text-align:right;
vertical-align:top;
background:white;
mso-pattern:auto none;}
.xlRojo
{mso-style-parent:style0;
font-family:Arial, sans-serif;
mso-font-charset:0;
background:red;
mso-pattern:auto none;}
</style>
<![if gte mso 9]>
<xml>
<x:ExcelWorkbook>
<x:ExcelWorksheets>
<x:ExcelWorksheet>
<x:Name><%=IDDCCtes.NOMBRE_APLICACION%></x:Name>
<x:WorksheetOptions>
<x:DefaultColWidth>10</x:DefaultColWidth>
<x:Print>
<x:ValidPrinterInfo/>
<x:HorizontalResolution>300</x:HorizontalResolution>
<x:VerticalResolution>300</x:VerticalResolution>
</x:Print>
<x:Zoom>75</x:Zoom>
<x:Selected/>
<x:ProtectContents>False</x:ProtectContents>
<x:ProtectObjects>False</x:ProtectObjects>
<x:ProtectScenarios>False</x:ProtectScenarios>
</x:WorksheetOptions>
</x:ExcelWorksheet>
</x:ExcelWorksheets>
<x:WindowHeight>6795</x:WindowHeight>
<x:WindowWidth>11340</x:WindowWidth>
<x:WindowTopX>-60</x:WindowTopX>
<x:WindowTopY>-30</x:WindowTopY>
<x:ProtectStructure>False</x:ProtectStructure>
<x:ProtectWindows>False</x:ProtectWindows>
</x:ExcelWorkbook>
</xml>
<![endif]>
<![if gte mso 9]>
<xml>
<o:shapedefaults v:ext="edit" spidmax="1026"/>
</xml>
<![endif]>
</head>
<body link=blue vlink=purple class=xlIzq>

<table x:str border=0 cellpadding=0 cellspacing=0 width="100%" style='border-collapse:collapse;table-layout:fixed;width:600pt'>

<tr height=21 style='height:15.75pt'>
<td height=21 class=xlIzq style='height:15.75pt'>&nbsp;</td>
<td colspan=5 class=xlCabecera>Listado de Comerciales:</td>
</tr>

<tr height=17 style='height:12.75pt'>
<td height=17 class=xlIzq style='height:12.75pt'>&nbsp;</td>
<td class=xlCabCen>Nombre Empresa</TD>
<td class=xlCabCen>NIF/CIF</TD>
<td class=xlCabCen>CCE</TD>
<td class=xlCabCen>NIF</TD>
<td class=xlCabCen>Nombre</TD>
<td class=xlCabCen>Apellido1</TD>
<td class=xlCabCen>Apellido2</TD>
<td class=xlCabCen>Tel&eacute;fono M&oacute;vil</TD>
<td class=xlCabCen>Correo Electr&oacute;nico</TD>
<td class=xlCabCen>Direcci&oacute;n</TD>
<td class=xlCabCen>Provincia</TD>
<td class=xlCabCen>Localidad</TD>
<td class=xlCabCen>C&oacute;digo Postal</TD>
<td class=xlCabCen>Tipo de Figura</TD>
<td class=xlCabCen>Accede a Portal Comercial</TD>
<td class=xlCabCen>Portatil</TD>
<td class=xlCabCen>Fecha Alta C&oacute;digo CCE</TD>
<td class=xlCabCen>Fecha Baja</TD>
<td class=xlCabCen>Comercial Gerente</TD>
<td class=xlCabCen>Accede a Certificaci&oacute;n</TD>
<td class=xlCabCen>Nivel de Certificaci&oacute;n</TD>
<td class=xlCabCen>Pago Infraestructura</TD>
</TR>
<tr height=6 style='mso-height-source:userset;height:3pt'>
<td height=6 class=xlIzq style='height:3pt'></td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
</tr>
<%
String color="Gis";
%>
<tr class=xlIzq height=26 style='mso-height-source:userset;height:19.5pt'>
<td height=26 class=xlIzq style='height:19.5pt'>&nbsp;</td>
<!-- NOMBRE ACTO -->
<td class=xlTxtIzq<%=color%>>x</TD>
<td class=xlTxtIzq<%=color%>>x</TD>
<td class=xlTxtIzq<%=color%>>x</TD>
<td class=xlTxtIzq<%=color%>>x</TD>
<td class=xlTxtIzq<%=color%>>x</TD>
<td class=xlTxtIzq<%=color%>>x</TD>
<td class=xlTxtIzq<%=color%>>x</TD>
<td class=xlTxtIzq<%=color%>>x</TD>
<td class=xlTxtIzq<%=color%>>x</TD>
<td class=xlTxtIzq<%=color%>>x</TD>
<td class=xlTxtIzq<%=color%>>x</TD>
<td class=xlTxtIzq<%=color%>>x</TD>
<td class=xlTxtIzq<%=color%>>x</TD>
<td class=xlTxtIzq<%=color%>>x</TD>
<td class=xlTxtIzq<%=color%>>x</TD>
<td class=xlTxtIzq<%=color%>>x</TD>
<td class=xlTxtIzq<%=color%>>x</TD>
<td class=xlTxtIzq<%=color%>>x</TD>
<td class=xlTxtIzq<%=color%>>x</TD>
<td class=xlTxtIzq<%=color%>>x</TD>
<td class=xlTxtIzq<%=color%>>x</TD>
<td class=xlTxtIzq<%=color%>>x</td>
</TR>

<tr height=6 style='mso-height-source:userset;height:1pt'>
<td height=6 class=xlIzq style='height:1pt'></td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
<td class=xlRojo>&nbsp;</td>
</tr>
<![if supportMisalignedColumns]>
<tr height=0 style='display:none'>
<td width=100 style='width:100pt'></td>
<td width=100 style='width:100pt'></td>
<td width=100 style='width:100pt'></td>
<td width=100 style='width:100pt'></td>
<td width=100 style='width:100pt'></td>
<td width=100 style='width:100pt'></td>
<td width=100 style='width:100pt'></td>
<td width=100 style='width:100pt'></td>
<td width=100 style='width:100pt'></td>
<td width=100 style='width:100pt'></td>
<td width=100 style='width:100pt'></td>
<td width=100 style='width:100pt'></td>
<td width=100 style='width:100pt'></td>
<td width=100 style='width:100pt'></td>
<td width=100 style='width:100pt'></td>
<td width=100 style='width:100pt'></td>
<td width=100 style='width:100pt'></td>
<td width=100 style='width:100pt'></td>
<td width=100 style='width:100pt'></td>
<td width=100 style='width:100pt'></td>
<td width=100 style='width:100pt'></td>
<td width=100 style='width:100pt'></td>
<td width=100 style='width:100pt'></td>
</tr>
<![endif]>
<tr>
<td class=xlIzq style='height:19.5pt'></td>

<script language="javascript">
function cerrar()
{
alert("cerrar");
}
</script>
<!-- Excel.Application.Quit -->
<td align="left"><a href="javascript:this.window.close()">a</a></td>
<!-- td><input type="button" value="Botón Normal" onclick="window.close()"></td> -->
</tr>
</table>
</body>
</html>

a
27 de Octubre del 2004
¿y?

julio
27 de Octubre del 2004
sorry, lo que quiero es cerrar la ventana web que se genera con este JSP, mediante un botón de cerrar que tengo que incluir dentro del excel que se genera, ¿alguna sugerencia? Gracias