aspose-cells / Aspose.Cells-for-.NET

Aspose.Cells for .NET examples, plugins and showcases
https://products.aspose.com/cells/net
MIT License
216 stars 103 forks source link

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

Open sunweiconfidence opened 3 years ago

sunweiconfidence commented 3 years ago

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

amjad-sahi commented 3 years ago

Could you please share "test.xlsx" and output Excel file here, we will check it soon. Also provide your expected file (you can create the expected encrypted file (containing your expected protected sheet in tact) in MS Excel manually).

Moreover, we have dedicated forums to get support in quick time and we encourage you to post your queries or issue in respective forum.

sunweiconfidence commented 3 years ago

@amjad-sahi

i can't access https://forum.aspose.com/c/cells/9 site, do you have any suggestion for it? thanks

aspose-com-kb commented 3 years ago

@sunweiconfidence

Are you not able to access the URL/Website at all or you're unable to create a new post? If the site is not accessible then please check your network/firewall settings because the forums are working pretty fine. To create a new post, you'll have to signup at the forums.

aspose-com-kb commented 3 years ago

@sunweiconfidence ,

Just an update. We did have a temporary glitch due to SSL issue at our end. However, it's fixed now. Please give it a try again. Thanks.