EXPORTAR DATOS

OSCAR PADILLA
28 de Junio del 2006
NESECITO EXPORTAR DATOS DE UNA TABLA A EXPENCION .XLS, PERO NO A UNA RUTA PRE ESTABLECIDA, ¿QUE COMANDO APLICO PARA QUE ME PIDA LA RUTA?. GRACIAS

rafael_jurado
28 de Junio del 2006

en vfp 6.0

use "nombre de tabla"
select "nombre de tabla"

copy to "xyz" for "condicion" type xls

o

select sql

select "campo1", "campo2"
from "xyz"
while "condicion"
into cursor "cursorx"
export to (nombre de archivo) type xls

para que te pida el nombre en una forma utiliza:

thisform.xl_file = GETFILE("XLS", This.Caption, "OK")

donde xl_file es una variable

o utiliza "?" al inicio del nombre de la variable

Obil
28 de Junio del 2006
Si es de fox a excel, podes usar esto.

USE EMPLEADO
EXPORT TO exportfile type XLS FIELDS NOMBRE,STATUS,NIT &&WHILE DEPTO=1