Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: Win32::OLE and Excel and the Web

by cacharbe (Curate)
on Apr 30, 2002 at 14:08 UTC ( #163067=note: print w/ replies, xml ) Need Help??

in reply to Win32::OLE and Excel and the Web

I ran your code on my Win2000adv without any problems either. Jmcnamara has the right of it, though. You will need to cast some of the properties as Variants to insure that you will get what you expect, especially the 'Zoom' property in this case.

I'll add an example of variant use like this to my tutorial -- Must have slipped by me.

my $vtfalse = Variant(VT_BOOL, 0); my $vtpages = Variant(VT_I4, 1); with ($Sheet->PageSetup, 'FitToPagesWide'=>$vtpages, 'FitToPagesTall'=>$vtpages, 'Zoom'=>$vtfalse, 'PrintGridlines'=>0, 'LeftHeader'=> "REPORT #DW2009A\rSummary Place of Service", 'CenterHeader' => "Empty", 'RightHeader' => "Test Report", 'LeftFooter' => "Done", 'CenterFooter' => "Now", 'Orientation' => xlLandscape, 'RightFooter' => "OK", 'PrintHeadings'=>0, 'FirstPageNumber'=> xlAutomatic, 'PrintTitleRows' => "1:1");


Update: Upon further investigation, I found that I *had* include an example of fitting a sheet to one page in the tutorial (including the 'Zoom'), but *hadn't* used VT_I4 types in the FitToPages(Wide|Tall) properties.

Comment on Re: Win32::OLE and Excel and the Web
Download Code
Replies are listed 'Best First'.
Re: Re: Win32::OLE and Excel and the Web
by Lando (Initiate) on May 01, 2002 at 18:46 UTC
    Ok, here's me being thickheaded. I want to make sure that you ran that code through a web-server. The code runs fine from the command line -- but it dies going through IIS. If I remove this section, it runs fine. However, on XP, using IIS 5.1, it runs fine. I'll definitely try using the variants, thank you both for your suggestions!

      I have an application that does what you asked and then some. I changed some settings in my test environment to match your question, and processed an (.xls) doc COMPLETELY through a web interface.


        Crap. I wonder what it is that I'm missing. =( Even the variant changes didn't help. Thanks anyway.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://163067]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (10)
As of 2016-05-26 11:44 GMT
Find Nodes?
    Voting Booth?