Win32::OLE - Excelo files hidden after SaveAs

Discussion in 'Perl Misc' started by Woland99, Mar 7, 2005.

  1. Woland99

    Woland99 Guest

    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
     
    Woland99, Mar 7, 2005
    #1
    1. Advertisements

  2. Woland99

    Henry Law Guest

    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.
     
    Henry Law, Mar 7, 2005
    #2
    1. Advertisements

  3. Woland99

    Woland99 Guest

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

    JT
     
    Woland99, Mar 11, 2005
    #3
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.