Free Support Forum - aspose.com

Currently- Workbook protected by password is not supported

Hi,

I was wondering if you guys would provide support for protected Excel files with the Aspose.Excel.Web component since currently when I try to load up a protected Excel file with this component, it’ll give me the following error:

Server Error in ‘/Surety’ Application.

Currently, Workbook protected by password is not supported.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Exception: Currently, Workbook protected by password is not supported.

Source Error:

Line 102: string str_FileName = cell_FileName.Text; Line 103: ExcelWeb1.WebWorksheets.Clear(); Line 104: ExcelWeb1.WebWorksheets.ImportExcelFile(“D:\Surety\” + str_FileName); Line 105: ExcelWeb1.RefreshControl(); Line 106: }

Source File: c:\inetpub\wwwroot\surety\webform1.aspx.cs Line: 104

Stack Trace:

[Exception: Currently, Workbook protected by password is not supported.] Aspose.Excel.?.?(MemoryStream ?) Aspose.Excel.?.?(String ?) Aspose.Excel.?.?(String ?) Aspose.Excel.Web.Data.?..ctor(String fileName) Aspose.Excel.Web.Data.?.ImportExcelFile(String fileName) Surety.WebForm1.Grid_ButtonCommand(Object sender, DataGridCommandEventArgs e) in c:\inetpub\wwwroot\surety\webform1.aspx.cs:104 System.Web.UI.WebControls.DataGrid.OnItemCommand(DataGridCommandEventArgs e) System.Web.UI.WebControls.DataGrid.OnBubbleEvent(Object source, EventArgs e) System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) System.Web.UI.WebControls.DataGridItem.OnBubbleEvent(Object source, EventArgs e) System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) System.Web.UI.Page.ProcessRequestMain() 


Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032

I am currently evaluating this component and this would post a problem for us since our client have many protected Excel files and our application would need a way to load those files up. Any help would be greatly appreciated.

Thanks,
Ricky

Hi Ricky,

While an Excel file is protected by a password, it’s encrypted. We don’t have docs on the encryption algorithm now. So you have to remove the protection passward for those files manually and then use Aspose.Excel.Web to load them.