in reply to Re^4: How to use win32::OLE with multiple versions of Microsoft Office?
in thread How to use win32::OLE with multiple versions of Microsoft Office?

Hi Dasgar, thanks for your continuing efforts to bring clarity and monkish wisdom. I wrote this snippet:
# print out constants loaded for Microsoft Office use strict; use warnings; use Win32::OLE::Const "Microsoft Office .* Object Library"; my $names = Win32::OLE::Const->Load("Microsoft Office .* Object Librar +y"); printf "Office type library contains %d constants:\n", scalar keys %$n +ames; foreach my $Key (sort keys %$names) { print "$Key = $names->{$Key}\n"; }
Perl64 5.14.1 responds with:
C:\winbat>perl -w msoconstants.pl Office type library contains 221 constants: KeepLocal = 0 LogMessages = 0 Replicable = 0 ReplicableBool = 0 V1xNullBehavior = 0 dbAppendOnly = 8 dbAttachExclusive = 65536 dbAttachSavePWD = 131072 dbAttachedODBC = 536870912 dbAttachedTable = 1073741824 dbAttachment = 101
(more than 200 lines of similar output suppressed). Apparently there are multiple typelibs in the registry, and only by coding 14.0 do I get the mso constants.

As far as I know, there was only one installtaion of Office 2010 on this machine, but those db constants suggest that Access (a part of Office Pro) might be involved?

Replies are listed 'Best First'.
Re^6: How to use win32::OLE with multiple versions of Microsoft Office?
by perl_new_b (Novice) on Jul 23, 2014 at 07:12 UTC

    Hi guys,

    can I use Win32::OLE without installing MS Office??

    Kindly suggest me something for this.

      can I use Win32::OLE without installing MS Office??

      Sure, for other things, like controlling internet explorer (some versions of), but not for controlling MS Office, you need MS office for that

      Kindly suggest me something for this.

      I hear ice always helps :)

        Ok thanks for the reply. :)

        can I append a row in excel file without parsing it and without using Win32::OLE?