Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel and AutoFilter
Message
 
To
28/01/2002 14:03:47
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00611780
Message ID:
00611817
Views:
35
This message has been marked as the solution to the initial question of the thread.
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!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform