amigos, queria saber si es posible crear un archivo excel a partir de cierta data existente en una base de datos...
conocen el procedimiento? q necesito?
gracias
| ||||
ok, te dejo el codigo... espero te sirva ![]()
Código:
en vez del For utiliza un while si se trata de un recordset hasta que sea fin de archivoSet FSOXLS = Server.CreateObject("Scripting.FileSystemObject") PathXLS = "ruta_del_archivo/archivo.xls" PathXLS = server.MapPath(PathXLS) Set Arch_Excel = FSOXLS.CreateTextFile(PathXLS, True) FinLinea = "Columna1" & chr(9) & "Columna2" Arch_Excel.writeline FinLinea for I = 1 to 25 FinLinea = I & chr(9) & "fila " & I & chr(9) Arch_Excel.writeline FinLinea next nota: el archivo debe existir. si no existe entonces has una funcion para crear el archivo y si no sabes entra a esta dirección: http://www.faqsdelweb.com/index.php?...f_id=2&s_id=30
__________________ Saruman One Ring to rule them all, One Ring to find them, One Ring to bring them all and in the darkness bind them. Última edición por Saruman; 20/09/2004 a las 07:29 |