in reply to Re: Re: Using Win32::OLE and Excel - Tips and Tricks
in thread Using Win32::OLE and Excel - Tips and Tricks
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
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.#!/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);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Using Win32::OLE and Excel - Tips and Tricks
by planetscape (Chancellor) on Dec 20, 2005 at 23:10 UTC |
In Section
Tutorials