Win32::OLE - Excelo files hidden after SaveAs

W

Woland99

Hi, I use Win32::OLE to read in and manipulate data from
Excel files. When I try to SaveAs modified file and then
reopen it I always have to Unhide it.
For example:
$wbook = ....

in a loop....
{
.....
$wsheet->Cells($row_num,$col_num)->{Value} = "$cell_value";
.....
}

and then:
$wbook->SaveAs($fullname_output_file);

makes $fullname_output_file hidden.
I do not see any property I can set on $wbook to Unhide it
(same way as from Windows menu in Excel).

Thanks for any pointers,

JT
 
H

Henry Law

Hi, I use Win32::OLE to read in and manipulate data from
Excel files. When I try to SaveAs modified file and then
reopen it I always have to Unhide it.
I do not see any property I can set on $wbook to Unhide it
(same way as from Windows menu in Excel).

This is almost certainly an Excel COM problem rather than a Perl one,
which means that you will probably get better help in a Microsoft COM
group rather than here (but you may need to hide the fact that you're
programming the COM object in such a sensible language as Perl!)

But if you Google in the groups for a post entitled "Win32::OLE hiding
Excel sheets" (dated April 2003) you'll see some suggestions.
 
W

Woland99

foreach $window (in $wbook->{Windows})
{$window->{Visible} = 1;}
and then:
$wbook->SaveAs($fullname_output_file);
does the trick.

JT
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top