Hello Monk,
Just read your documentation on Excel, and found it extremely useful.
I have a problem and looking for some help regarding this.
This is my code below
#!/usr/bin/perl
use Win32::OLE qw(in with);
use Win32::OLE::Const 'Microsoft Excel';
my $Excel = Win32::OLE->GetActiveObject('Excel.Application')
|| Win32::OLE->new('Excel.Application', 'Quit');
$MacroName = "LargeFileImport";
#Running a macro
$excelfile = "c:\\SndExMail\\test.xls";
my $Book = $Excel->Workbooks->Open($excelfile);
my $Sheet = $Book->Worksheets("Sheet1");
$Sheet->Activate();
$Excel->Run($MacroName);
I am running a macro, which will generate another excel file with certain values spanning across multiple sheets. Now after i execute the above code, a pop is displayed asking me to save sheet1 (this is generated after the macro is run). I can set displayalerts to 0 but At the same time i want to save the excel file generated by the macro with some name so that i ccan open it for manipulations later. Please let me know how to go about doing this.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|