Re: [Boston.pm] Win32::OLE Do you want to save changes? popup.

2006-05-02 Thread Greg London
That was it. I thought it was like a filehandle and I just
needed to Close it. The example I found that played
with the spreadsheet didn't do a Save(), so I didn't.
It works as intended now.
 
Thanks to Jarrad and Richard for the answers.
Greg




From: Jerrad Pierce [mailto:[EMAIL PROTECTED]
Sent: Tue 5/2/2006 5:03 PM
To: Greg London
Cc: boston-pm@mail.pm.org
Subject: Re: [Boston.pm] Win32::OLE Do you want to save changes? popup.



Presumably you need to explicitly save?

It's worth noting that Excel has odd conceptions of change--resizing the
columns in the display of a CSV will provoke this message--however you are
legitimately being posed this quesiton IMHO.
--
H4sICNoBwDoAA3NpZwA9jbsNwDAIRHumuC4NklvXTOD0KSJEnwU8fHz4Q8M9i3sGzkS7BBrm
OkCTwsycb4S3DloZuMIYeXpLFqw5LaMhXC2ymhreVXNWMw9YGuAYdfmAbwomoPSyFJuFn2x8
Opr8bBBidcc=
--
MOTD on Boomtime, the 49th of Discord, in the YOLD 3172:
Free to be whatever I Whatever I want and that's what makes it a right


 
___
Boston-pm mailing list
Boston-pm@mail.pm.org
http://mail.pm.org/mailman/listinfo/boston-pm


Re: [Boston.pm] Win32::OLE Do you want to save changes? popup.

2006-05-02 Thread Richard Morse
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


Re: [Boston.pm] Win32::OLE Do you want to save changes? popup.

2006-05-02 Thread Jerrad Pierce
Presumably you need to explicitly save?

It's worth noting that Excel has odd conceptions of change--resizing the
columns in the display of a CSV will provoke this message--however you are
legitimately being posed this quesiton IMHO.
-- 
H4sICNoBwDoAA3NpZwA9jbsNwDAIRHumuC4NklvXTOD0KSJEnwU8fHz4Q8M9i3sGzkS7BBrm
OkCTwsycb4S3DloZuMIYeXpLFqw5LaMhXC2ymhreVXNWMw9YGuAYdfmAbwomoPSyFJuFn2x8
Opr8bBBidcc=
--
MOTD on Boomtime, the 49th of Discord, in the YOLD 3172:
Free to be whatever I Whatever I want and that's what makes it a right 
 
___
Boston-pm mailing list
Boston-pm@mail.pm.org
http://mail.pm.org/mailman/listinfo/boston-pm