Ask a Question related to PERL Modules, Design and Development.
-
Phil #1
Everything but the column: win32::OLE Excel fun
This doesn't print out anything. I want it to print the desired
range I selected in the $array declaration.
I appreciate any insights!
Thanks,
-Phil
/////////////////////////////
use Win32::OLE;
eval {$Excel = Win32::OLE->GetActiveObject('Excel.Application')};
die "Excel not installed" if $@;
unless (defined $ex) {
$Excel = Win32::OLE->new('Excel.Application', sub
{$_[0]->Quit;})
or die "Oops, cannot start Excel";
}
$Excel = Win32::OLE->GetActiveObject('Excel.Application');
$Book = $Excel->Workbooks->Open('C:\Documents and
Settings\pvernes\Desktop\CDS CORRELATOIN
PROJECT\Ford_equity_cds_data2.xls'); # open Excel file
$Sheet = $Book->Worksheets(1); # select worksheet
number 1
$array = $Sheet->Range('AA6:AA508')->{value}; # get the contents
$Book->Close;
foreach $array (@array) {
print $array;
}
Phil Guest
-
How to create or modify an Excel file with embedded charts w/o Win32::OLE?
I am creating a web application that creates custom excel workbooks containing embedded charts for users to download. I know Win32::OLE can do... -
Win32-OLE excel cell reference.
Guys, I'm struggling with the syntax to point to the cells that I want to use in Excel. It seems that the Range command likes data like (A14),... -
Win32::OLE, Excel and OLE Automation question
"A. Sinan Unur" <asu1@c-o-r-n-e-l-l.edu> wrote in message news:<Xns93B9985BBBFFasu1cornelledu@132.236.56.8>... Thanks for the reply - I still got... -
Win32-OLE, excel, and empties.
Hello World! I'm trying to find the first empty row in a spreadsheet. If I use this: my $EmptyRow = $sheet->UsedRange->rows->count;... -
Win32::OLE, Excel, and coloring
Hello, I've been using ActiveState's ActivePerl to generate Excel spreadsheets using the Win32::OLE module. The rudimentary examples that are... -
John Bokma #2
Re: Everything but the column: win32::OLE Excel fun
"Phil" <Philip.Vernes@GfiGroup.com> wrote:
> use Win32::OLE;
>
> eval {$Excel = Win32::OLE->GetActiveObject('Excel.Application')};
> die "Excel not installed" if $@;
> unless (defined $ex) {
$ex?
--
John Bokma Freelance software developer
&
Experienced Perl programmer: [url]http://castleamber.com/[/url]
John Bokma Guest
-
harryfmudd [AT] comcast [DOT] net #3
Re: Everything but the column: win32::OLE Excel fun
Phil wrote:
use strict;> This doesn't print out anything. I want it to print the desired
> range I selected in the $array declaration.
>
> I appreciate any insights!
>
> Thanks,
>
> -Phil
>
> /////////////////////////////
>
use warnings;
# Then fix up the errors you get.
# This loop does not print anything because the above code>
> use Win32::OLE;
>
> eval {$Excel = Win32::OLE->GetActiveObject('Excel.Application')};
> die "Excel not installed" if $@;
> unless (defined $ex) {
> $Excel = Win32::OLE->new('Excel.Application', sub
> {$_[0]->Quit;})
> or die "Oops, cannot start Excel";
> }
> $Excel = Win32::OLE->GetActiveObject('Excel.Application');
>
> $Book = $Excel->Workbooks->Open('C:\Documents and
> Settings\pvernes\Desktop\CDS CORRELATOIN
> PROJECT\Ford_equity_cds_data2.xls'); # open Excel file
>
> $Sheet = $Book->Worksheets(1); # select worksheet
> number 1
> $array = $Sheet->Range('AA6:AA508')->{value}; # get the contents
>
> $Book->Close;
>
# does not put anything in @array.
__END__> foreach $array (@array) {
> print $array;
>
> }
>
Tom Wyant
harryfmudd [AT] comcast [DOT] net Guest



Reply With Quote

