Set the attributes manuslly like this
That is a snippet from an Win32::OLE report I did. with is just a fancy way of saying set the following parameters for this object...$sheet->Range("A1:J18")->Font->{Size} = 9; #Center the sheet $sheet->Range("A1:J18")->{HorizontalAlignment} = $$xlConst{'xlHAli +gnCenter'}; #Label Averages and Totals $sheet->Range("A17")->{Value} = "Sums"; $sheet->Range("A18")->{Value} = "Averages"; #Put the values in $sheet->Range("A1")->{Value} = "Performance:"; $sheet->Range("C1")->{Value} = $client; #Format the fonts $sheet->Range("A1")->Font->{Bold} = TRUE; $sheet->Range("A17:A18")->Font->{Bold} = TRUE; $sheet->Range("C1")->Font->{Italic} = TRUE;
To explain this in natural language, you could say
which would be like using a with block as opposed totake my dog and{ wash ; dry ; feed ; }
which is just setting those things explicitly. the with block is syntacticaly tyrrany I tell you !!!!!wash my dog; dry my dog; feed my dog;
In reply to Re: Re: Re: OLE & Excel
by Grygonos
in thread OLE & Excel
by Saadat_saeed
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |