I want to load a protected workbook for readonly access. The spreadsheet I have has a password for "Protect Structure and Windows" set. This does not disallow the file from being opened, just from workbooks being added to the file. When I try to load the workbook, I get the error listed below. Is there a way around this? Will this be fixed in a later release? Attached is the file used(with the extension changed from xls to txt to allow uploading).
{"Attempted to read past the end of the stream."}
at Infragistics.Excel.Serialization.BiffRecordStream.ReadFormattedString(UInt16 stringLength) at Infragistics.Excel.Serialization.BiffRecordStream.ReadFormattedString(LengthType lengthType) at Infragistics.Excel.Serialization.BIFF8.BiffRecords.WRITEACCESSRecord.Load(BIFF8WorkbookSerializationManager manager) at Infragistics.Excel.Serialization.BIFF8.BIFF8WorkbookSerializationManager.LoadCurrentRecord() at Infragistics.Excel.Serialization.BIFF8.BIFF8WorkbookSerializationManager.LoadWorkbookContents() at Infragistics.Excel.Serialization.WorkbookSerializationManager.Load() at Infragistics.Excel.Workbook.LoadBIFF8File(Workbook workbook, Stream stream, String parameterName) at Infragistics.Excel.Workbook.LoadHelper(Stream stream, WorkbookFormat format, String parameterName, IPackageFactory packageFactory, Boolean verifyExcel2007Xml) at Infragistics.Excel.Workbook.Load(String fileName, IPackageFactory packageFactory, Boolean verifyExcel2007Xml) at Infragistics.Excel.Workbook.Load(String fileName, IPackageFactory packageFactory) at Infragistics.Excel.Workbook.Load(String fileName) at Compeat.WinForms.ImportJournalEntriesSpreadsheet.btnImportSelectedJournalEntryFiles_Click(Object sender, EventArgs e) in C:\Work\Compeat.NET\Compeat.WinForms\ImportJournalEntriesSpreadsheet.cs:line 204 at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e) at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e) at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met) at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met) at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ToolStrip.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(Form mainForm) at Compeat.NET.Startup.Main(String[] args) in C:\Work\Compeat.NET\Compeat.NET\Startup.cs:line 181 at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()
This feature to open password protected workbooks is not yet implemented. I have forwarded this post to the Developer Support Manager to create a feature request on your behalf.
Hi,
Can you tell me if this feature has been implemented yet? If so what version do I need to download and if not is it planned to implement this feature?
Thanks,
Redrag.
No, this is still not supported.
I don't have any information on when (or if) this will be implemented. The new features we implement are prioritized, in part, by the number of requests we receive for that feature.
So if you have not already, you should Submit a feature request to Infragistics.
I have also forwarded your comments to the product manager.
I would also like to know when or if this feature will be implemented.
Thanks Mike, any idea of whether its planned to implement this in the near future?
Mike Dour forwarded this thread to the Developer Support Manager to create a feature request in December 2009, is this issue not a priority for Infragistics?