Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Troubles transposing a range in Excel with Win32::OLE

by jmcnamara (Monsignor)
on Jan 10, 2002 at 04:21 UTC ( [id://137627]=note: print w/replies, xml ) Need Help??


in reply to Troubles transposing a range in Excel with Win32::OLE


It looks like "Transpose" requires a Variant agrument. The following works for me:
use Win32::OLE::Variant; # ... $worksheet->Cells(10,5)->PasteSpecial( { Paste => xlAll, Operation => xlNone, SkipBlanks => 0, Transpose => Variant(VT_BOOL, 'True') });

--
John.

Replies are listed 'Best First'.
Re: Re: Troubles transposing a range in Excel with Win32::OLE
by guha (Priest) on Jan 10, 2002 at 14:10 UTC

    Problem Solved

    Should this be considered a bug in OLE ?
    Knowing that c-era could replicate the problem in VB, why was there no refs of this found in google ?
    Is Transpose such a rare creature or is it just me ??

    Kudos to jmcnamara and c-era!

    Thanks2


      I don't think that this is a bug.

      However, it is often hard to match Perl's variable types with those expected by VBA. That is why the Win32::OLE::Variant module is so useful.

      A good resource for Win32::OLE related information is the ActiveState mailing lists. In particular the perl-win32-users list. Jan Dubois, the author of Win32::OLE, often answers questions there.

      As an aside, Win32::OLE is an extremely powerful module and potentially very useful. However, it is let down by a lack of comprehensive documentation and examples.

      --
      John.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://137627]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2024-03-28 08:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found