Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Delete first record
Message
 
To
13/04/2006 09:51:38
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01113359
Message ID:
01113425
Views:
21
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?
Previous
Reply
Map
View

Click here to load this message in the networking platform