Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re^2: Setting Excel cell formats

by merrymonk (Hermit)
on Jul 26, 2007 at 14:13 UTC ( #628935=note: print w/replies, xml ) Need Help??

in reply to Re: Setting Excel cell formats
in thread Setting Excel cell formats

Many thanks to all.
The codes line were just what I wanted.
I do have another setting question that I posted yesterday.
As I have not had any replies I have taken the liberty of repeating it below.

I want to change the values for an Excel spreadsheet that are set
manually with File->page set up. Below is part of the code I am using.
All works fine except the $sheet->set_margins_LR which has not effect at all
$workbook = $excel->Workbooks->Add; $sheet = $workbook->Worksheets("Sheet1"); $sheet->Activate(); $sheet->{Name} = "Tool List"; $sheet_margin = 2; $sheet->set_margins_LR($sheet_margin);
What should I be doing?

Replies are listed 'Best First'.
Re^3: Setting Excel cell formats
by Samy_rio (Vicar) on Jul 27, 2007 at 04:08 UTC

    Hi merrymonk, set the left and right margin value like below

    $sheet1->PageSetup->{LeftMargin} = $Excel->InchesToPoints("0.19"); $sheet1->PageSetup->{RightMargin} = $Excel->InchesToPoints("0.54");

    In the same way, you can set the value of the remaining margin.

    TopMargin BottomMargin HeaderMargin FooterMargin

    Velusamy R.

    eval"print uc\"\\c$_\""for split'','j)@,/6%@0%2,`e@3!-9v2)/@|6%,53!-9@2~j';

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://628935]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2018-05-26 14:32 GMT
Find Nodes?
    Voting Booth?