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
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.