Estimados, alguno me podria indicar como crear un archivo de texto sin ocupar TDOSPRN
Muchas gracias!
CRAR ARCHIVO PLANO SIN USAR TDOSPRN
Re: CRAR ARCHIVO PLANO SIN USAR TDOSPRN
yo lo hago así :
function creatxt()
local cFile := " c:\nombre.txt"
local cText:= ""
cText += " lo que quieras en la linea 1 " +CRLF
cText += " lo que quieras en la linea 2 " +CRLF
........
memoWrite( MEMOWRIT( cFile, cText, .f. )
return nil
function creatxt()
local cFile := " c:\nombre.txt"
local cText:= ""
cText += " lo que quieras en la linea 1 " +CRLF
cText += " lo que quieras en la linea 2 " +CRLF
........
memoWrite( MEMOWRIT( cFile, cText, .f. )
return nil
- Armando
- Posts: 3280
- Joined: Fri Oct 07, 2005 8:20 pm
- Location: Toluca, México
- Been thanked: 4 times
- Contact:
Re: CRAR ARCHIVO PLANO SIN USAR TDOSPRN
Ozono:
Otra opción es usar las funciones
FCREATE()
FWRITE()
FCLOSE()
Échales una mirada.
Saludos
Otra opción es usar las funciones
FCREATE()
FWRITE()
FCLOSE()
Échales una mirada.
Saludos
SOI, s.a. de c.v.
[email protected]
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
[email protected]
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
- Armando
- Posts: 3280
- Joined: Fri Oct 07, 2005 8:20 pm
- Location: Toluca, México
- Been thanked: 4 times
- Contact:
Re: CRAR ARCHIVO PLANO SIN USAR TDOSPRN
Ozono:
Encontré un ejemplo
Saludos
Encontré un ejemplo
Code: Select all | Expand
nHandle := FCreate(cFile,FC_NORMAL)
IF nHandle <= 0
MsgStop("No pude crear el archivo " + cFile + " !",oApp:cAplicacion)
RETURN(.T.)
ENDIF
....
....
.....
FWRITE(nHandle,STRZERO(nNum,9,0) +;
SPACE(16) +;
"99" +;
oRsEmp:Fields("EMP_CTA"):Value + SPACE(15 - LEN(oRsEmp:Fields("EMP_CTA"):Value)) +;
SPACE(05) +;
STRZERO(INT(nNeto),13,0) +;
STRZERO(INT(nDeci * 100),2,0) +;
cAyN + SPACE(40 - LEN(cAyN)) +;
"001001")
.....
.....
.....
FCLOSE(nHandle)
Saludos
SOI, s.a. de c.v.
[email protected]
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
[email protected]
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero