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

hi, i have a script that populates an excel workbook, and i have a different modules in the workbook which operate on specified columns in a worksheet. i want teh script to call one of the subroutines after it populates the data. how do it do this? The subroutine is not associated with any trigger like selectionchange, worskeetchange, workbooksave etc..
  • Comment on HOW to call a Excel Macro subroutine from perl

Replies are listed 'Best First'.
Re: HOW to call a Excel Macro subroutine from perl
by jesuashok (Curate) on Apr 10, 2007 at 05:44 UTC
      hi, tried it...It works...thanx... i feel that i didn't know what was the problem.. thanx again
      with regards to excel i m having another problem the same script after populating the data and saving, and closing the workbook, will populate another workbook. When it tries to do that i get the following error
      Win32::OLE(0.1701) error 0x8001010a: "The message filter indicated tha +t the application is busy" in METHOD/PROPERTYGET "" at populator.pl line 17
      the script will create an excel object for every file it will open..is this wrong? do i need to destroy the object?
        marlboroguy58:

        It's rather difficult to find the error without seeing the code. My best (blind) guess would be that you should simply skip the creation of the excel object after the first invocation. Something like:

        $XL = ExcelObject(...) unless $XL;
        ...roboticus