Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replacing in text file or Excel file
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01211612
Message ID:
01211733
Views:
12
>thanks your reply But one thing is reming record insert and should not delete previous records. pleae give me more help thanks
SET DELETED ON
or
FOR NOT DELETED()
CLOSE DATABASES ALL

SET SAFETY OFF 
SET DELETED ON  &&& here

CREATE TABLE Test (firstfld I, SecondFld C(20))
INSERT INTO Test VALUES(10,[Ten])
INSERT INTO Test VALUES( 2,[Two])
INSERT INTO Test VALUES( 1,[One])
INSERT INTO Test VALUES( 9,[Nine])

LOCATE FOR firstfld = 1

IF NOT EOF()
   DELETE
ENDIF

lcxls = PUTFILE([],[example_xls],[xls])
IF NOT EMPTY(m.lcxls)
   COPY TO (lcxls) XLS
***   COPY TO (lcxls) FOR NOT DELETED() XLS &&& or here
ELSE
   MESSAGEBOX([XLS - No path])
ENDIF

lctxt = PUTFILE([],[example_txt],[txt])
IF NOT EMPTY(m.lctxt)
   COPY TO (lctxt) SDF
   *** or
***COPY TO (lctxt) DELIMITED
ELSE
   MESSAGEBOX([TXT - No path])
ENDIF
_______________________________________________________________
Testing displays the presence, not the absence of bugs.
If a software application has to be designed, it has to be designed correctly!
_______________________________________________________________
Vladimir Zografski
Systems Analyst
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform