We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Lock project for viewing

Hi,


I am pretty sure that is not possible to use Aspose.Cells to set the “Lock project for viewing” in the VBA-editor (Tools->VBAProject Properties->Protection).

May I add a feature request: Make it at least possible to check if this has been set.

It is absolutely crucial that our developers turn on the “Lock project for viewing” when designing the Excel templates, but sometimes they forget. If we at least can check if the flag is set, our code can prevent showing the Excel document to a user.

Thanks,
Fredrik


Hi,


Thanks for providing details about your desired feature.

I have logged your feature request i.e., Support “Lock project for viewing” Protection option in VbaProject Properties as an id “CELLSNET-45216” into our database for product team’s consideration. Our concerned developer from product team will evaluate it soon.

Once we have an update on it, we will let you know here.

Thank you.

Hi,


We are pleased to inform you that we have fixed your issue logged earlier as “CELLSNET-45216”. We will soon provide you the fix after performing QA and incorporating other enhancements and fixes.

Thank you.
Hi,

Thanks for using Aspose.Cells.

Please download and try the following latest fix

Aspose.Cells for .NET v17.03.1 (.NET 2.0) compiled in .NET Framework 2.0.
Aspose.Cells for .NET v17.03.1 (.NET 4.0) compiled in .NET Framework 4.0.

and let us know your feedback.
Here is a sample code for your reference.

C#
Workbook wb = new Workbook("inFile.xlsm");
Aspose.Cells.Vba.VbaProject vbaProject = wb.VbaProject;
//Whether "Lock project for viewing" or not
Console.WriteLine("isProtectView: " + vbaProject.IslockedForViewing);
//Lock project for viewing
vbaProject.Protect(true, "your password");
wb.Save("outFile.xlsm");

The issues you have found earlier (filed as CELLSNET-45216) have been fixed in Aspose.Cells for .NET 17.4.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.