<?xml version="1.0" encoding="windows-1252"?>
<node id="430194" title="How to install Win32::OLE under Linux?" created="2005-02-11 13:08:03" updated="2005-08-15 11:47:10">
<type id="956">
perltutorial</type>
<author id="294784">
dpavlin</author>
<data>
<field name="doctext">
&lt;p&gt;
I wanted to run [cpan://Win32::OLE]
on my development machine which is Debian Linux. This tutorial is based on
&lt;a href="http://www.codeweavers.com/"&gt;CrossOver Office Standard&lt;/a&gt; 4.1,
but it should also work with &lt;a href="http://www.winehq.com/"&gt;Wine&lt;/a&gt; (not tested).
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt; Download and install &lt;a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=CEBBACD8-C094-4255-B702-DE3BB768148F"&gt;Windows Installer 2.0 Redistributable for Windows 95, 98, and Me&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt; Download latest
&lt;a href="http://downloads.activestate.com/ActivePerl/Windows/5.8/"&gt;
Active State Perl for Windows&lt;/a&gt; &lt;em&gt;in &lt;tt&gt;.msi&lt;/tt&gt; format&lt;/em&gt;.
I used &lt;tt&gt;ActivePerl-5.8.6.811-MSWin32-x86-122208.msi&lt;/tt&gt;.
&lt;/li&gt;
&lt;blockquote&gt;
&lt;font color="#808080"&gt;&lt;b&gt;Note:&lt;/b&gt;
I tried to install &lt;tt&gt;.zip&lt;/tt&gt; format, but it didn't work for me. That's
why you need first to install MSI 2.0 update.                        
&lt;/font&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;Start installation:
&lt;code&gt;
$ /opt/cxoffice/bin/wine "C:~WB~WINDOWS~WB~SYSTEM~WB~msiexec.exe" /i ActivePerl-5.8.6.811-MSWin32-x86-122208.msi
&lt;/code&gt;
After a while, it should be over.
&lt;/li&gt;
&lt;li&gt;Now you have perl installed in
&lt;tt&gt;~/.cxoffice/dotwine/fake_windows/Perl/&lt;/tt&gt;.
Try to run it:
&lt;pre&gt;
$ uname -a
Linux llin 2.6.10-1-686 #1 Tue Jan 18 04:34:19 EST 2005 i686 GNU/Linux
$ /opt/cxoffice/bin/wine "c:\Perl\bin\perl.exe" -v
&lt;/pre&gt;
You should get something like:
&lt;pre&gt;
This is perl, v5.8.6 built for MSWin32-x86-multi-thread
(with 3 registered patches, see perl -V for more detail)

Copyright 1987-2004, Larry Wall

Binary build 811 provided by ActiveState Corp. http://www.ActiveState.com
ActiveState is a division of Sophos.
Built Dec 13 2004 09:52:01

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'.  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
&lt;/pre&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;em&gt;That's it!&lt;/em&gt;. It wasn't hard at all.
&lt;/p&gt;
&lt;blockquote&gt;
&lt;font color="#808080"&gt;&lt;b&gt;Note:&lt;/b&gt;
&lt;strike&gt;
There are some problems however. While calling Excel via OLE works with
CrossOver, if you have Excel started it will stop responding to GUI events.
So, Excel window will look like it's frozen, but your scripts should be able
to communicate with Excel anyway.
&lt;/strike&gt;
&lt;br/&gt;
&lt;b&gt;Update:&lt;/b&gt; I was totally wrong. Adding &lt;tt&gt;$excel-&gt;{Visible} = 1;&lt;/tt&gt; fixed my problem. fvwm just doesn't know how to minimize running Excel.
&lt;/font&gt;
&lt;/blockquote&gt;
And, now assorted list of links to get you
started with Excel and OLE automation. TPJ article is very good introduction needed for Linux-nerd like me.
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://search.cpan.org/dist/Win32-OLE/lib/Win32/OLE/TPJ.pod"&gt;The Perl Journal #10 - Win32::OLE by Jan Dubois
&lt;/a&gt;
&lt;li&gt;&lt;A HREF="http://aspn.activestate.com/ASPN/docs/ActivePerl-5.6/faq/Windows/ActivePerl-Winfaq12.html"&gt;ActivePerl Help - Online Docs : Using OLE with Perl&lt;/A&gt;&lt;/li&gt;
&lt;li&gt;[id://153486]&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;

</field>
</data>
</node>
