943,809 Members | Top Members by Rank

Ad:
  • Perl Discussion Thread
  • Unsolved
  • Views: 1670
  • Perl RSS
Feb 10th, 2009
0

OLE and Office 2007

Expand Post »
Hi,

This is my first question in the forum and I was wondering if anyone knew the answer. For the past 8 years or so, I have been using OLE to transfer information between perl and excel and word. I actually wrote a word version today for the first time in a long time. I am currently using the 2003 versions of excel, word and powerpoint. Powerpoint is the most arcane. One of the things I discovered is that I can go from perl to excel (via OLE) and then cut and paste (through perl) via MS-Graph/OLE to powerpoint. The nice advantage of this backwards and complex way of doing things is that it makes the graphs in Powerpoint native - that is, they are not embedded excel objects and can be edited natively in powerpoint. If anyone wants to know how to do those things I can demonstrate.

However - and here is the big thing - I have for the first time in 8 years experienced a problem with this process. I have found that occasionally I get the message "can't empty clipboard" and instead of the graph in powerpoint I get the variable (the handle) in perl appear in the place. That is, instead of a graph I get text saying something like "$$fh->{value}=$handle;" - really, that's what appears.

So my question is, has anyone been working with Office 2007 and XML to transfer data to MS Office? If so, can you direct me to some resources so that I can replace OLE with XML? I have scoured the net and found very little. Maybe if I figure it out, I'll write a book - haha.

Thanks,
Mike
Similar Threads
Reputation Points: 26
Solved Threads: 38
Posting Whiz in Training
mitchems is offline Offline
293 posts
since Feb 2009
Feb 11th, 2009
0

Re: OLE and Office 2007

I have no esperience in what you are doing, but my first thought is are you sure you didn't make some type of a mistake? When you see a variable as literal text instead of the interpolated value of a variable its almost always a quoting problem.
Reputation Points: 246
Solved Threads: 67
Practically a Posting Shark
KevinADC is offline Offline
898 posts
since Mar 2006
Feb 11th, 2009
0

Re: OLE and Office 2007

No, no mistake. I may have typed the output wrong (I'll have to check it - it is a pointer to a handle of the graph) but what I do is create a 120 page powerpoint document with ms-graph and powerpoint. Each page has either 1 or 2 graphs on it. It works great on every other page, except when I get this "can not clear clipboard" message and then, instead I get the CODE from perl on the page instead of the graph. I just wanted to move over to XML instead, because the excel to ms graph to powerpoint works 99% (or more) of the time, but it is clunky and has some sort of memory problem, which has been recently developed (I think it's the new version of MS-Graph).


Click to Expand / Collapse  Quote originally posted by KevinADC ...
I have no esperience in what you are doing, but my first thought is are you sure you didn't make some type of a mistake? When you see a variable as literal text instead of the interpolated value of a variable its almost always a quoting problem.
Reputation Points: 26
Solved Threads: 38
Posting Whiz in Training
mitchems is offline Offline
293 posts
since Feb 2009
Feb 12th, 2009
0

Re: OLE and Office 2007

I really have zero experience here so all I can do is wish you good luck.
Reputation Points: 246
Solved Threads: 67
Practically a Posting Shark
KevinADC is offline Offline
898 posts
since Mar 2006
Feb 13th, 2009
0

Re: OLE and Office 2007

Well, I looked around CPAN to see if there are new modules for the new format, and there aren't any yet. There are some for XML-based spreadsheets, but those are OLD. I guess someone will have to write a new set of modules. Not the answer I wanted, but it is the one I got.
Reputation Points: 26
Solved Threads: 38
Posting Whiz in Training
mitchems is offline Offline
293 posts
since Feb 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Perl Forum Timeline: regex not validating email
Next Thread in Perl Forum Timeline: Help splitting file





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC