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?