On May 2, 2006, at 4:45 PM, Greg London wrote: > I'm using Win32::OLE to read and write a number of spreadsheets > from a perl/tk script. When the user clicks a button, I go through > and write some cells: > > my $Excel = Win32::OLE->GetActiveObject('Excel.Application') > || Win32::OLE->new('Excel.Application', 'Quit'); > > [snip] > $Sheet->Cells($row,$col)->{'Value'} = $value; > > $Book->Close; > > I end up doing this a couple of times per operation. > The annoying bit is that I get a popup asking the user > "Do you want to save changes" yes/no.
Do you save the workbook at any time? I don't see it in the code you posted. If you do, there is a way to do this (at least I think I recall running into this), but off the top of my head, I don't recall it. I think I was able to find it through some kind of Google search a few years ago. It has something to do with a parameter you pass to the close call, I think... HTH, Ricky _______________________________________________ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm