Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
thanks in advance for any help you can give me.use Win32::OLE; my $acum = 0; my $file2Parse = "c:/failureFile.xls"; my @DBrow; my @DBResult; my $ref; $row = 1; $ex = Win32::OLE->GetActiveObject('Excel.Application'); $ex = Win32::OLE->new('Excel.Application') or die "Oops, canno +t start Excel"; # get a new workbook $book = $ex->Workbooks->Open($file2Parse) or die "no file open +ed"; # write to a particular cell $sheet = $book->Worksheets(1); while ($acum!=17) { $acum = 0; for ($column=1;$column<=17;$column++) { print $sheet->Cells($row,$column)->{Value}."||"; # $DBrow[$column-1] = $sheet->Cells($row,$column)->{Value +}; if ($sheet->Cells($row,$column)->{Value} eq "") { $acum++; } } if ($acum != 17) { # $DBResult[$row-1] = [@DBrow]; } $row++; } $book->Close; undef $book; undef $ex;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Data Types and Win32::OLE
by pc88mxer (Vicar) on Feb 26, 2008 at 15:48 UTC |