Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Not needed records
Message
De
08/09/2005 02:20:47
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Not needed records
Versions des environnements
Visual FoxPro:
VFP 8
Database:
Visual FoxPro
Divers
Thread ID:
01047607
Message ID:
01047607
Vues:
47
hi all,
would you help, .

at the end of this code under i need to delete all records <> my condation
, and convert my table to excel book with many sheet if it is possiple
Select * from am ;
  where INLIST( val(char3), 100, 201, 202, 203 );
 and ( inList( upper(allt(char25)), "ADSL 1", "B ISDN  ") or upper(left(char25,2)) = "LL" );
this is all code under
CLOSE all
activate screen
SET TALK OFF
SET ECHO off
GETDIR()

thisform.text1.Value=GETFILE()

SET DEFAULT TO e:\ut
LOCAL am
am = thisform.text2.value  
CREATE TABLE &am(char1 C(10), char2 C(70),char3 C(10), char4 C(10),char5 C(10), char6 C(40),char7 C(10), char8 C(10),char9 c(10), char10 c(40),char11 C(10), char12 C(60),char13 C(50), char14 C(40),char15 C(10), char16 C(10),char17 C(10), char18 C(70),char19 C(10), char20 C(10),char21 C(10), char22 C(40),char23 C(10), char24 C(10),char25 C(10), char26 C(70),char27 C(10), char28 C(10) NOCPTRANS)
APPEND FROM (thisform.text1.value)TYPE XLS

use am exclusive
 index on val(char9) tag char9
 

select  sys(2015) as SortOrder,* from am ;
 order by 1 descending ;
 into cursor crsTemp nofilter


select am
zap
select crsTemp

scan
 if !seek(char9,'am','char9')
   scatter memvar memo

   insert into am from memvar
 endif
endscan

Select * from am ;
  where INLIST( val(char3), 100, 201, 202, 203 );
 and ( inList( upper(allt(char25)), "ADSL 1", "B ISDN  ") or upper(left(char25,2)) = "LL" );

COUNT TO s
? s
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
**after this operations I use this code under to convert mytable to excel *book,
*any way to separate  excel book to sheets as 
*sheet1 for  rrow_line_ =upper(alltrim(adsl 1)
*sheet2 arow_line_ =upper(alltrim(BSDN) ,
*sheet3 arow_line_ =upper(alltrim(ll)

USE am
*GETFILE()

gcDelimName = ALIAS( ) + '.xls'

gcDelimFile = PUTFILE('excel_file:', gcDelimName, 'xls')

IF EMPTY(gcDelimFile)  && Esc pressed

   CANCEL

ENDIF

COPY TO (gcDelimFile) XLS   && Create delimited file
thanks.
Répondre
Fil
Voir

Click here to load this message in the networking platform