Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
That doesn't happen on MY machine
Message
De
21/12/2006 16:13:08
 
 
À
21/12/2006 15:27:19
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 6 SP3
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01179645
Message ID:
01179680
Vues:
10
I just realize that I have a BUG in my suggestion (After I read Alan's answer) :-)
Change this:
....
lcPath  = SET([PATH])
SET PATH TO
IF FILE(m.newfile)
   lnHndlr = FOPEN(m.newfile, 12)
   lnFor   = 1
   DO WHILE lnHndlr < 0
      m.newfile = m.dir + [data\labels]+ALLTRIM(STR(lnFor)) + [.xls]
      IF FILE(m.newfile)
         lnHndlr = FOPEN(m.newfile, 12)
      ELSE
         lnHndlr = FCREATE(m.newfile)
         EXIT
      ENDIF
      lnFor     = lnFor + 1
   ENDDO
ELSE
   lnHndlr = FCREATE(m.newfile)
ENDIF
SET PATH TO (lcPath)
FCLOSE(lnHndlr) && Don't care abou of the action of open or creating the file is successful
IF lnHndlr < 0
   MessageBox([You don't have permissions to create a file)
ELSE
   *** Excel SaveAS method
ENDIF
*** cleaning code
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform