raju1 has asked for the wisdom of the Perl Monks concerning the following question:

Hi Friends,

I had a perl script to convert .txt files to .xls after doing some calculations and filtering. It was working fine in Excel 2010.Recently I had Excel 2016 installed and from then its throwing me an error as follows "No type library matching "Microsoft Excel" found at C:\GMIO Transaction Audit Process\Perl Script\NewScript.pl line 13". Here is the script till line 13. Request your help regarding this

#!/usr/bin/perl # These are the modules the program utilizes. # Strict is a module which compiles the code to avoid syntax issues. # List::Util was utilized for part of the random selection . # The POSIX module was utilized also in the random selection #function + # Win32::OLE is for utilizing Excel within Perl. use strict; use File::Find; use POSIX qw(ceil); use List::Util 'shuffle'; use Win32::OLE::Const "Microsoft Excel";

Replies are listed 'Best First'.
Re: Perl Script Not working Excel 2016
by marto (Cardinal) on Jan 18, 2019 at 10:39 UTC

    I suspect this is related to rt://48858. A quick web search shows some results suggesting which registry key to create (as suggested in that rt ticket), I don't work on Windows anymore, so you'd need to check.

    Update: I think this should help find the GUID you need, if this one doesn't match what you have installed: c:\wmic product where "name like '%%Excel%%'". Hopefully a Windows person will turn up who can advise better.

    Update 2: without knowing what you're doing in excel, this may not be appropriate, but I use Excel::Writer::XLSX to create xlsx files, without the need for the Excel program, or Windows.