Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Just another Perl shrine
 
PerlMonks

How to install Win32::OLE under Linux?

by dpavlin (Pilgrim)
 | Log in | Create a new user | The Monastery Gates | Super Search | 
 | Seekers of Perl Wisdom | Meditations | PerlMonks Discussion | 
 | Obfuscation | Reviews | Cool Uses For Perl | Perl News | Q&A | Tutorials | 
 | Poetry | Recent Threads | Newest Nodes | Donate | What's New | 

on Feb 11, 2005 at 18:08 UTC ( #430194=perltutorial: print w/ replies, xml ) Need Help??

I wanted to run Win32::OLE on my development machine which is Debian Linux. This tutorial is based on CrossOver Office Standard 4.1, but it should also work with Wine (not tested).

  • Download and install Windows Installer 2.0 Redistributable for Windows 95, 98, and Me
  • Download latest Active State Perl for Windows in .msi format. I used ActivePerl-5.8.6.811-MSWin32-x86-122208.msi.
  • Note: I tried to install .zip format, but it didn't work for me. That's why you need first to install MSI 2.0 update.
  • Start installation:
    $ /opt/cxoffice/bin/wine "C:~WB~WINDOWS~WB~SYSTEM~WB~msiexec.exe" /i A +ctivePerl-5.8.6.811-MSWin32-x86-122208.msi
    After a while, it should be over.
  • Now you have perl installed in ~/.cxoffice/dotwine/fake_windows/Perl/. Try to run it:
    $ 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
    
    You should get something like:
    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.
    

That's it!. It wasn't hard at all.

Note: 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.
Update: I was totally wrong. Adding $excel->{Visible} = 1; fixed my problem. fvwm just doesn't know how to minimize running Excel.
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.

Comment on How to install Win32::OLE under Linux?
Download Code
Re: How to install Win32::OLE under Linux?
by zentara (Chancellor) on Feb 11, 2005 at 20:47 UTC
    Cool! I always wondered how to get wine to run ActiveState Perl.

    I'm not really a human, but I play one on earth. flash japh
[reply]
Re: How to install Win32::OLE under Linux?
by dpavlin (Pilgrim) on Feb 11, 2005 at 21:47 UTC
    I would actually like to compile Win32::OLE using native wine libraries so that I can re-use Linux perl instead of having another copy, but that will have some other Win32 perl hacker (my knowledge of Win32 API is null).

    2share!2flame...
[reply]
Re: How to install Win32::OLE under Linux?
by ForgotPasswordAgain (Chaplain) on Mar 13, 2005 at 22:34 UTC
[reply]
Re: How to install Win32::OLE under Linux?
by Anonymous Monk on Aug 13, 2008 at 15:42 UTC
    Hi, I've installed ActivePerl and Microsoft Office. Both of them work on linux, but while I'm trying to open word document in perl I am gettin OLE error: Could not open macro storage. I've read that it is linked with trying to run word without active user (ie. server automation) - is there any solution to this problem on linux?
[reply]

Back to Tutorials


Login:
Password
remember me
What's my password?
Create A New User

Node Status
node history
Node Type: perltutorial [id://430194]
help
Community Ads
Chatterbox
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users
Others imbibing at the Monastery: (9)
GrandFather
wfsp
jmcnamara
atcroft
herveus
Eyck
NodeReaper
gnosti
im2
As of 2009-11-21 09:35 GMT
Sections
The Monastery Gates
Seekers of Perl Wisdom
Meditations
PerlMonks Discussion
Categorized Q&A
Tutorials
Obfuscated Code
Perl Poetry
Cool Uses for Perl
Perl News
Information
PerlMonks FAQ
Guide to the Monastery
What's New at PerlMonks
Voting/Experience System
Tutorials
Reviews
Library
Perl FAQs
Other Info Sources
Find Nodes
Nodes You Wrote
Super Search
List Nodes By Users
Newest Nodes
Recently Active Threads
Selected Best Nodes
Best Nodes
Worst Nodes
Saints in our Book
Leftovers
The St. Larry Wall Shrine
Offering Plate
Awards
Craft
Snippets Section
Code Catacombs
Quests
Editor Requests
Buy PerlMonks Gear
PerlMonks Merchandise
Planet Perl
Perlsphere
Use Perl
Perl.com
Perl 5 Wiki
Perl Jobs
Perl Mongers
Perl Directory
Perl documentation
CPAN
Random Node
Voting Booth

Future historians will find that the material characteristic of the current era is...

Aluminium
Plastic
Oil
Water
Carbon dioxide
Copper
Iron
Silicon
Salt
Uranium
Hydrogen
Other

Results (729 votes), past polls