hiii any body tell me whats wrong with this prog... actually m trying to make a prog to delete blank cell form my excel sheet but m unable in it ...if u know then plz let me know. My code is
#!/usr/bin/perl -w use strict; use warnings; use Win32::OLE qw(in with); use Win32::OLE::Const 'Microsoft Excel'; use Spreadsheet::WriteExcel; $Win32::OLE::Warn = 3; my $Excel = Win32::OLE->GetActiveObject('Excel.Application') || Win32::OLE->new('Excel.Application', 'Quit'); $Excel->{Visible} = 1; my $Book = $Excel->Workbooks->Open("c:\\perl\\copy of BK11.xls"); my $Sheet = $Book->Worksheets(1); my $count=0; foreach my $row (1..3226) { foreach my $col (1..14) { if (!defined($Sheet->Cells($row,$col)->{'Value'})) { $Sheet->Cells($row,$col)->EntireRow->Delete; $count++; } } }
In reply to how to remove blank cell with perl by meghavarshney
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |