in reply to Unexpected Excel TypeLib error

Is is safe simply to remove this line (I have the same modules running in other versions of Excel)?

No.

That line is supposed to import excel constants, if it doesn't import the constants they won't be defined, and your program can't use them

But if your program doesn't actually use them ....

So its up to you :)

site:perlmonks.org No type library matching "Microsoft Excel"

Replies are listed 'Best First'.
Re^2: Unexpected Excel TypeLib error
by Anonymous Monk on Oct 12, 2015 at 08:29 UTC

    Constants are useless without an app (like excel), so use an ole instance to get the constants, the best way to get constants, direct quote from the docs/Win32::OLE::Const

    use Win32::OLE; use Win32::OLE::Const; my $Excel = Win32::OLE->new('Excel.Application', 'Quit'); my $xlcon = Win32::OLE::Const->Load($Excel); ... $xlcon->{xlMarkerStyleDot} ...