Foros del Web » Programando para Internet » Javascript » Frameworks JS »

abrir excel

Estas en el tema de abrir excel en el foro de Frameworks JS en Foros del Web. Hola amigos. Estuve investigando como exportar una tabla a excel con jquery pero no me queda bien lo descarge aqui; http://jqplugins.appspot.com/table2csv AL exportarlo no me ...
  #1 (permalink)  
Antiguo 24/11/2009, 15:32
 
Fecha de Ingreso: febrero-2009
Mensajes: 142
Antigüedad: 15 años, 3 meses
Puntos: 0
abrir excel

Hola amigos.

Estuve investigando como exportar una tabla a excel con jquery pero no me queda bien lo descarge aqui;


http://jqplugins.appspot.com/table2csv

AL exportarlo no me abre la ventana para guardalo o abirlo


Ojala puedan ayudarme

HTML:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
<head>
<link rel="stylesheet" type="text/css" media="all" href="css/style.css" />
<script src="js/jquery-1.2.6.min.js">//</script>

<script src="js/jquery.table2csv.js">//</script>
<script>
jQuery(function ($) {
$("div#leftnav").insertMenu();
$("a#csv-link").click(function () {
$("table#my-table").table2csv({
callback: function (csv, name) {
location.href = "/csvdownload?csv=" + encodeURIComponent(csv) + "&name=" + name;
}
});
});
});
</script>
<title>Leonardo Rossetti javascript demos</title>
</head>
<body>
<div id="container">
<div id="leftnav">

</div>
<div id="content">
<p><a href="javascript:void(0)" id="csv-link">Download the CSV file</a></p>

<table id="my-table">
<caption>table_in_csv_format</caption>
<thead>
<tr>
<th>Name1</th>
<th>Name2</th>
<th>Name3</th>
<th>Name4</th>
<th>Name5</th>
</tr>
</thead>
<tbody>
<tr>
<td>c1r1</td>
<td>c2r1</td>
<td>c3r1</td>
<td>c4r1</td>
<td>c5r1</td>
</tr>
<tr>
<td>c1r2</td>
<td>c2r2</td>
<td>c3r2</td>
<td>c4r2</td>
<td>c5r2</td>
</tr>
<tr>
<td>c1r3</td>
<td>c2r3</td>
<td>c3r3</td>
<td>c4r3</td>
<td>c5r3</td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
</html>
  #2 (permalink)  
Antiguo 01/12/2009, 14:45
Avatar de hector2c  
Fecha de Ingreso: noviembre-2007
Ubicación: Perú - Tacna
Mensajes: 979
Antigüedad: 16 años, 5 meses
Puntos: 25
Pregunta Respuesta: abrir excel

waaaaaaaaaaa, creeme que en verdad intente resolver el problema T^T mmmmm

pero al parecer:
Código HTML:
location.href = "/csvdownload?csv=" + encodeURIComponent(csv) + "&name=" + name;
me pareciera que es un archivo "x", puede ser php, por que, el plugin jquery le envia datos via GET o POST, no recuerdo, pero de que envia envia (segun firebug), junto al nombre de la hora del fichero csv...

seguire investigando, por que tambien me puede servir... nos vemos!!!
__________________
blog: hector2c.wordpress.com
email: [email protected]
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 20:06.