Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delete first record
Message
 
À
13/04/2006 09:51:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01113359
Message ID:
01113425
Vues:
20
Hi,

If I understand you correctly, you do not wish to remove the first row in the Excell sheet, but you want to remove the data from several particular fields in the first row. Then do it as usual:

- open Excel file manually;
- record a Macro while removing data as needed;
- review the VBA code for recorded MAcro and translate it to the VFP code.

Good Luck


>hi,
>still i have problem,
>code under delete a,date,flag but keep num at the first record
>
>CLOSE all
>USE JUSTSTEM(thisform.text9.value)+".dbf" in 0
>gcDelimName = ALIAS( ) + '.xls'
>gcDelimFile = PUTFILE('excel_file:', gcDelimName, 'xls')
>IF EMPTY(gcDelimFile)  && Esc pressed
>   CANCEL
>ENDIF
>COPY fields num,a,date,flag TO (gcDelimFile) XLS
>oExcel= CREATEOBJECT("Excel.Application")
>oExcel.Workbooks.Open(gcDelimFile)  &&&&&& i change
>*oExcel.Workbooks.Open(pFile)
>oExcel.ActiveSheet.Rows(1).Delete
>oExcel.ActiveWorkbook.Save()
>oExcel.quit
>release oExcel
>SET DEFAULT TO d:\sami
>
>
>>Sorry, do not understand: do you still have problem or it works?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform