Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Wise ones,
I am trying to write a very simple perl script using win32::ole. The purpose of this script is to open many Mathcad format files, and save them in an older version.
Pseudo-Code
for each file in file list { open file in mathcad; save as other version; close file in mathcad; }
i havent got very far, but have the following;
use Win32::OLE; my $mcd = Win32::OLE->new('Mathcad.Application'); $mcd->{'Visible'} = 1; my $file_full_name = Win32::GetFullPathName($ARGV[0]); my $sht = $mcd->{'Worksheets'}->Open($file_full_name); $mcd->SaveAs($full_file_name, [mcMcad2001i 11]); # this is a guess! $mcd->Close();
obviously this doesnt work, and falls over with an undefined value on the Open line.
any ideas?
20060316 Janitored by Corion: Fixed formatting
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: win32::ole Mathcad
by marto (Cardinal) on Mar 16, 2006 at 13:32 UTC |