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

Recommended Answers

All 4 Replies

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.

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).

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.

I really have zero experience here so all I can do is wish you good luck.

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.