in reply to Excel Save & Cell Protect

Hi,

Why do't you just do $excel->Workbooks(1)->Save then? You only need SaveAs($fname) if you are changing the name/location of the file.

If you've got Excel installed just do ALT+F11 to get the the VB IDE and then insert a module, type your keywords (e.g. Protect) and hit F1 (help) for the VB syntax.

Something like this should work although you really need to use the manual!

$excel->sheet(1)->Cells(1, 1)->CurrentRegion->Cells->Protect

Replies are listed 'Best First'.
Re: Re: Excel Save & Cell Protect
by Anonymous Monk on Sep 11, 2003 at 16:15 UTC
    I tried the ALT+F11 with protect and got the following

    Example

    As it applies to the Chart and Worksheet objects.

    This example protects the active worksheet. You can verify the worksheet is protected, by attempting to enter a value into any cell, on the active worksheet.

    Sub ProtectSheet()

    ActiveSheet.Protect Scenarios:=True, UserInterfaceOnly:=True

    End Sub

    This example protects the active chart. You can verify the chart is protected, by attempting to enter a value into any cell, on the active worksheet. This example assumes a chart exists in the application.

    Sub ProtectChart()

    ActiveChart.Protect Scenarios:=True, UserInterfaceOnly:=True

    End Sub

    This only shows how toprotect whole sheets or charts. I want to protect indivual cells. Therefore I guess I really do need the book!

Re: Re: Excel Save & Cell Protect
by Anonymous Monk on Sep 11, 2003 at 15:54 UTC
    Many thanks for your reply. I would like to use the manual if only I knew which one it was! Therefore anything like a title would help greatly.