nesecito guardar
Publicado por Felipe (129 intervenciones) el 28/04/2006 17:58:07
nesecito poder guardar un dbf como *.txt, *.xls, *.mdf, como lo puedo hacer lo estoy intentando con el comando put file pero no me guarda como lo puedo realizar¿? o em falta algodel comando, aqui les va el codigo fuente:
thisform.pageframe1.Enabled = .F.
eMessageTitle = '¡ ADVERTENCIA ¡'
eMessageText = 'Esta Seguro de Los Datos Cambiados?'
nDialogType = 4 + 48 + 256
nAnswer = Messagebox(emessagetext,ndialogtype,eMessageTitle)
nname =ALIAS( )
IF nanswer = 6 then
guardar = PUTFILE(' Guardar:', nname , ' *.txt')
IF !EMPTY(guardar)
WAIT 'Exportando a Texto...'WINDOW NOWAIT
COPY TO guardar.txt DELIMITED
MODIFY FILE (guardar) NOEDIT
WAIT CLEAR
if file(guardar)
if messagebox('Se ha exportado a texto satisfactoriamente' + chr(13) + 'Desea ver el documento generado?',292,'Reportes') = 6
DECLARE INTEGER ShellExecute IN SHELL32.DLL INTEGER nWinHandle, STRING cOperation, STRING cFileName, STRING cParameters, STRING cDirectory, INTEGER nShowWindow
ShellExecute(0,"open",guardar,"","",1)
endif
else
messagebox('No se ha podido exportar a texto',48,'Error')
endif
endif
ELSE
**limpiar
ENDIF
thisform.pageframe1.Enabled = .F.
eMessageTitle = '¡ ADVERTENCIA ¡'
eMessageText = 'Esta Seguro de Los Datos Cambiados?'
nDialogType = 4 + 48 + 256
nAnswer = Messagebox(emessagetext,ndialogtype,eMessageTitle)
nname =ALIAS( )
IF nanswer = 6 then
guardar = PUTFILE(' Guardar:', nname , ' *.txt')
IF !EMPTY(guardar)
WAIT 'Exportando a Texto...'WINDOW NOWAIT
COPY TO guardar.txt DELIMITED
MODIFY FILE (guardar) NOEDIT
WAIT CLEAR
if file(guardar)
if messagebox('Se ha exportado a texto satisfactoriamente' + chr(13) + 'Desea ver el documento generado?',292,'Reportes') = 6
DECLARE INTEGER ShellExecute IN SHELL32.DLL INTEGER nWinHandle, STRING cOperation, STRING cFileName, STRING cParameters, STRING cDirectory, INTEGER nShowWindow
ShellExecute(0,"open",guardar,"","",1)
endif
else
messagebox('No se ha podido exportar a texto',48,'Error')
endif
endif
ELSE
**limpiar
ENDIF
Valora esta pregunta


0