Skip to content

Can't encrypt excel's specific sheet using c# #61

Description

@sunweiconfidence

hi,

i use below code to encrypt excel's specific sheet, but not work, for Workbook, i can encrypt successfully:

        string excelFile = Path.Combine(currentDirectory, "test.xlsx");
        string encryptedfile = Path.Combine(currentDirectory, "encryptedtest.xlsx");
        Workbook workbook = new Workbook(excelFile);
        workbook.Worksheets[0].Protect(ProtectionType.All, "1234", "");
        // Save the excel file
        workbook.Save(encryptedfile);

so what should i use to let it work, i use aspost.cells version as below:
Aspose.Cells: 20.11.0
OS: Windows10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions