<?xml version="1.0" encoding="windows-1252"?>
<node id="517986" title="Re^3: Using Win32::OLE and Excel - Tips and Tricks" created="2005-12-20 03:36:13" updated="2005-12-19 22:36:13">
<type id="11">
note</type>
<author id="496350">
nisha</author>
<data>
<field name="doctext">
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
&lt;code&gt;
#!/usr/bin/perl
use Win32::OLE qw(in with);
use Win32::OLE::Const 'Microsoft Excel';
my $Excel = Win32::OLE-&gt;GetActiveObject('Excel.Application')
        || Win32::OLE-&gt;new('Excel.Application', 'Quit');

$MacroName = "LargeFileImport";
#Running a macro
$excelfile = "c:\\SndExMail\\test.xls";
my $Book = $Excel-&gt;Workbooks-&gt;Open($excelfile); 
my $Sheet = $Book-&gt;Worksheets("Sheet1");
$Sheet-&gt;Activate();

$Excel-&gt;Run($MacroName);
&lt;/code&gt;
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.</field>
<field name="root_node">
153486</field>
<field name="parent_node">
274802</field>
</data>
</node>
