Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel cut and paste special
Message
From
26/09/2001 20:19:07
 
 
To
26/09/2001 09:58:03
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00560864
Message ID:
00561289
Views:
19
>>Hi all,
>>
>>Does anyone know the properties and methods to cut and paste special a range of data using Excel automation?
>>
>>I had a nice function that sent a cursor to an Excel spread sheet, ran a pivot table, and created a time-date series chart from the pivot table. It worked fine on my machine but then blew up on a different one. Turns out I was using Excel 97 and the other machine has 2000. One of the improvement of Excel 2000 is that you can't create a time-date series chart from a pivot table (so says the help). So the function errored when I tried to access an x axis property that was not accessible on that type of chart.
>>
>>The quickest way I can think around this is to copy the data from the pivot table and then use paste special to put the values back on the sheet, and then run the chart off of that.
>>
>>TIA,
>>
>>Ken
>
>The following works for me:
>
oXL = GetObject(,"excel.application")
>oXL.ActiveSheet.Range("A7:C9").Copy
>oXL.ActiveSheet.Range("A50").PasteSpecial
>Although I'm not sure how this plays with the data inside a pivot table.
>HTH

Right on the money. Thank you very much.

Ken
Previous
Reply
Map
View

Click here to load this message in the networking platform