use Win32::OLE; my $xlApp = Win32::OLE->new('Excel.Application'); $xlApp->{Visible} = 0; $xlApp->{DisplayAlerts} = 0; # Open excel file. my $xlBook = $xlApp->Workbooks->Open("C:\\Documents and Settings +\\username\\Desktop\\testfile.xls"); my $Sheet1 = $xlBook->Worksheets(1); my $row = 1; my $col = 1; $Sheet1->Cells($row,$col)->{'Value'} = 5; if (Win32::OLE->LastError) { print "File protected"; } $xlBook ->Close(); undef $xlBook;
In reply to Suppressing password prompting of an excel file. by pankaj_it09
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |