Ver Mensaje Individual
  #1 (permalink)  
Antiguo 03/09/2015, 02:03
zenixdavid
 
Fecha de Ingreso: septiembre-2015
Ubicación: Madrid
Mensajes: 2
Antigüedad: 8 años, 8 meses
Puntos: 0
Obtener excel a partir de xslt

Buenas,

Estoy creando un excel a partir de un archivo xslt/xml. Hasta ahi todo bien, el problema viene cuando intento crear mas de una pestaña en la excel. Con el codigo que uso solo me muestra la ultima pestaña que tengo escrita. Ahi va el codigo:

<?xml version="1.0" encoding="ISO-8859-1"?>

<xsl:stylesheet version="1.0" xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:user="urn:my-scripts" xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet">

<xsl:output method="xml" encoding="ISO-8859-1" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" omit-xml-declaration="yes"/>

<xsl:decimal-format name="euro" decimal-separator="," grouping-separator="."/>

<xsl:template match="/">

<Worksheet ss:Protected="0" ss:Name="OBB Datos básicos">
<head>
<title>OBB Datos básicos</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<table border="1">
<tr>
<th align="center" bgcolor="grey" colspan="6" ><font color="black">Detalle de la OBB</font></th>
</tr>
</table>
<table>
<tr>
<th align="left" bgcolor="white" colspan="1">Clase de operación:</th>
<td align="left" bgcolor="white" colspan="1"><xsl:value-of select="CB_fileHandler/detalleBasicos/claseOperacion"/></td>
</tr>
<tr>
<th align="left" bgcolor="white" colspan="1">Descripción básica bancaria:</th>
<td align="left" bgcolor="white" colspan="1"><xsl:value-of select="CB_fileHandler/detalleBasicos/descripBasicaBancaria"/></td>
</tr>
<tr>
<th align="left" bgcolor="white" colspan="1">Situación:</th>
<td align="left" bgcolor="white" colspan="1"><xsl:value-of select="CB_fileHandler/datosBasicos/situacion"/></td>
</tr>
<tr>
<th align="left" bgcolor="white" colspan="1">Acumulador:</th>
<td align="left" bgcolor="white" colspan="1"><xsl:value-of select="CB_fileHandler/datosBasicos/acumulador"/></td>
</tr>
<tr>
<th align="left" bgcolor="white" colspan="1">Aplicación:</th>
<td align="left" bgcolor="white" colspan="1"><xsl:value-of select="CB_fileHandler/datosBasicos/aplicacion"/></td>
</tr>
<tr>
<th align="left" bgcolor="white" colspan="1">Subaplicación:</th>
<td align="left" bgcolor="white" colspan="1"><xsl:value-of select="CB_fileHandler/datosBasicos/subaplicacion"/></td>
</tr>
<tr>
<th align="left" bgcolor="white" colspan="1">Objeto técnico:</th>
<td align="left" bgcolor="white" colspan="1"><xsl:value-of select="CB_fileHandler/datosBasicos/objetoTecnico"/></td>
</tr>
<tr>
<th align="left" bgcolor="white" colspan="1">Indicador situación y morosidad:</th>
<td align="left" bgcolor="white" colspan="1"><xsl:value-of select="CB_fileHandler/detalleBasicos/indSituacion"/> - <xsl:value-of select="CB_fileHandler/detalleBasicos/indMorosidad"/></td>
</tr>
<tr>
<th align="left" bgcolor="white" colspan="1">Fecha paso a desarrollo:</th>
<td align="left" bgcolor="white" colspan="1"><xsl:value-of select="CB_fileHandler/datosBasicos/fechaPasoDesarrollo"/></td>
</tr>
<tr>
<th align="left" bgcolor="white" colspan="1">Fecha inicio:</th>
<td align="left" bgcolor="white" colspan="1"><xsl:value-of select="CB_fileHandler/datosBasicos/fechaInicio"/></td>
</tr>
<tr>
<th align="left" bgcolor="white" colspan="1">Fecha fin:</th>
<td align="left" bgcolor="white" colspan="1"><xsl:value-of select="CB_fileHandler/datosBasicos/fechaFin"/></td>
</tr>
<tr>
<th align="left" bgcolor="white" colspan="1">Fecha fin marcaje:</th>
<td align="left" bgcolor="white" colspan="1"><xsl:value-of select="CB_fileHandler/datosBasicos/fechaFinMarcaje"/></td>
</tr>
<tr>
<th align="left" bgcolor="white" colspan="1">Descripción:</th>
<td align="left" bgcolor="white" colspan="1"><xsl:value-of select="CB_fileHandler/datosBasicos/descripcion"/></td>
</tr>
</table>
</Worksheet>

<Worksheet ss:Protected="0" ss:Name="Conceptos">
<head>
<title>Conceptos</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<table border="1">
<tr>
<th align="center" bgcolor="grey" colspan="6" ><font color="black">Concepto</font></th>
<th align="center" bgcolor="grey" colspan="6" ><font color="black">Nombre Concepto</font></th>
<th align="center" bgcolor="grey" colspan="6" ><font color="black">Grupo Concepto</font></th>
<th align="center" bgcolor="grey" colspan="6" ><font color="black">Número de orden</font></th>
<th align="center" bgcolor="grey" colspan="6" ><font color="black">Ocurrencia</font></th>
<th align="center" bgcolor="grey" colspan="6" ><font color="black">Fecha Inicio</font></th>
<th align="center" bgcolor="grey" colspan="6" ><font color="black">Fecha Fin</font></th>
<th align="center" bgcolor="grey" colspan="6" ><font color="black">Texto del concepto</font></th>
<th align="center" bgcolor="grey" colspan="6" ><font color="black">Descripcion</font></th>
<th align="center" bgcolor="grey" colspan="6" ><font color="black">Formato</font></th>
<th align="center" bgcolor="grey" colspan="6" ><font color="black">Precisión</font></th>
<th align="center" bgcolor="grey" colspan="6" ><font color="black">Longitud</font></th>
</tr>
</table>
<table>
<xsl:element name="CB_fileHandler">
<xsl:for-each select="CB_fileHandler/listaConceptos/registro">
<xsl:element name="registro">
<tr>
<xsl:element name="concepto">
<td align="left" bgcolor="black" colspan="1"><xsl:value-of select="concepto"/></td>
</xsl:element>
<xsl:element name="nombreConcepto">
<td align="right" bgcolor="black" colspan="1"><xsl:value-of select="nombreConcepto"/></td>
</xsl:element>
<xsl:element name="grupoConcepto">
<td align="right" bgcolor="black" colspan="1"><xsl:value-of select="grupoConcepto"/></td>
</xsl:element>
<xsl:element name="numOrden">
<td align="center" bgcolor="black" colspan="1"><xsl:value-of select="numOrden"/></td>
</xsl:element>
<xsl:element name="ocurrencia">
<td align="right" bgcolor="black" colspan="1"><xsl:value-of select="ocurrencia"/></td>
</xsl:element>
<xsl:element name="fechaInicio">
<td align="right" bgcolor="black" colspan="1"><xsl:value-of select="fechaInicio"/></td>
</xsl:element>
<xsl:element name="fechaFin">
<td align="right" bgcolor="black" colspan="1"><xsl:value-of select="fechaFin"/></td>
</xsl:element>
<xsl:element name="textoConcepto">
<td align="right" bgcolor="black" colspan="1"><xsl:value-of select="textoConcepto"/></td>
</xsl:element>
<xsl:element name="descripcion">
<td align="right" bgcolor="black" colspan="1"><xsl:value-of select="descripcion"/></td>
</xsl:element>
<xsl:element name="formato">
<td align="right" bgcolor="black" colspan="1"><xsl:value-of select="formato"/></td>
</xsl:element>
<xsl:element name="precision">
<td align="right" bgcolor="black" colspan="1"><xsl:value-of select="precision"/></td>
</xsl:element>
<xsl:element name="longitud">
<td align="right" bgcolor="black" colspan="1"><xsl:value-of select="longitud"/></td>
</xsl:element>
</tr>
</xsl:element>
</xsl:for-each>
</xsl:element>
</table>
</Worksheet>

</xsl:template>
</xsl:stylesheet>

¿Hay alguna etiqueta para diferenciar una pestaña de otra, algun indice o algo que haga que no me pise la anterior?

Gracias por adelantado.

Última edición por zenixdavid; 03/09/2015 a las 03:44