Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default problem with pivot table automation using perl


I'm using perl win32::ole trying to automate some pivot table stuff.
I saw a post that indicated direct manipluation of pivot tables with
perl
may not be supported. I tried a different route.

We get a workbook that has several worksheets, each worksheet
has the same colum types but different data. I created a macro
to create a pivot table from a worksheet called "pivot_source".
Then I rename each worksheet to pivot_source, (eg I rename Sheet3 to
pivot_source).
I then run the macro which creates a pivot table from pivot_source,
then I rename pivot_source back to something else like old_source3 or
something
and go to the next worksheet. If I do this by hand, renameing each
worksheet
and then running the macro, it seems to work.

but if in perl I do something like

$worksheet = $workbooks-WorkSheets("Sheet3");
$worksheet-Activate();
$worksheet-{Name} = "pivot_source";
$Excel-Run("pivotMacro");
$worksheet-{Name}= "oldsource3";

it seems to work OK for the first invocation, but when it gets to doing
the second pivot table it dies. This isn't the exact code I use, but
it looks something like that. I use variables instead of literals since
I am doing multiple invocations. Even if I save the .xls file,
after each macro run and start afresh, I have the same problem.

Any help would be greatly appreciated ..

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
what is the perl table ??? and how i can use this sunil sharma New Users to Excel 0 May 8th 08 09:39 AM
minor but irritating problem when generating Excel files with Perl EJF Excel Programming 5 March 7th 06 06:06 AM
Pivot Table Vba Automation In 2002 Barolo Excel Programming 0 August 18th 04 07:31 PM
Pivot Table Automation Questions JV[_2_] Excel Programming 1 June 3rd 04 12:52 PM
Excel 2000 Macro and Perl problem Jim Simpson Excel Programming 0 May 19th 04 06:45 PM


All times are GMT +1. The time now is 05:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"