Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel and AutoFilter
Message
De
28/01/2002 14:49:14
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00611780
Message ID:
00611822
Vues:
54
Thanks!!

>This work for me:
>
>ObjExcel.Range("A1").AutoFilter(13, "jphilipp")
>
>
>
>>I would like to use VFP7 to create an Excel SpreadSheet. The data comes from a couple of tables, one original data, the other corrected. I’ve combined them into a cursor then placing them onto the clipboard and pasting it into the spreadsheet. They want the information of the edited records to be in a different color. Using Excel’s autofilter ( a VERY cool feature ) I can filter the changed records and set the color. I am unable to figure how to do that thru VFP. My code:
>>
>>
_VFP.DATATOCLIP(,,3)
>>oXL = CREATEOBJECT("Excel.Application")
>>oXL.workbooks.ADD( )
>>oXL.ActiveSheet.paste
>>oXL.RANGE("A1").SELECT
>>oXL.SELECTION.AutoFilter
>>
>>This gets everything set up but now I need to pick the column and the filter.
>>
>>The macro produces:
>>
Range("A1").Select
>>Selection.AutoFilter
>>Selection.AutoFilter Field:=13, Criteria1:="jphilipp"
>>
>>Any idea how I convert it to fox code?
>>
>>BTW, the spreadsheet will end up with 14,000 records and it takes too long to loop through and add the records one by one (unless I’m doing something wrong.)
>>
>>Thanks!
Jim Philippi

quando omni flunkus moritati
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform