darknessomi / darknessomi/excellibrary
ExcelLibrary.SpreadSheet.Workbook.Load(template) = Exception "Stream was not writable"
- Dominant language
- C#
- Stars
- 22
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
```
What steps will reproduce the problem?
1. Create and save normal xls file as template.xls
2. book = ExcelLibrary.SpreadSheet.Workbook.Load("template.xls")
3.
What is the expected output? What do you see instead?
Expect xls file to loadin memory / book object
What version of the product are you using? On what operating system?
ExcelLibrary_20090331, XP SP3, VS2008
Please provide any additional information below.
ASP.NET project (VB.NET)
Files saved as xls or xl97 format, with / without macro - same concern.
Exception...
"Stream was not writable."
Stack...
at System.IO.BinaryWriter..ctor(Stream output, Encoding encoding)
at ExcelLibrary.CompoundDocumentFormat.CompoundDocument..ctor(Stream stream, FileHeader header)
at ExcelLibrary.CompoundDocumentFormat.CompoundDocument.Open(Stream stream)
at ExcelLibrary.CompoundDocumentFormat.CompoundDocument.Read(Stream stream)
at ExcelLibrary.SpreadSheet.Workbook.Load(Stream fileStream)
at ExcelLibrary.SpreadSheet.Workbook.Load(String file)
at PPMSWEB.ExcelLibraryReportBuilder.ReadTemplate(String template)
at PPMSWEB.ProductionOverview.ExportButton_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
```
Original issue reported on code.google.com by `sdmclaug...@gmail.com` on 24 Sep 2010 at 3:16
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with Workbook.Load(String), Workbook.Load(Stream), and the CompoundDocument.Open/Read calls shown in the stack trace, then reproduce the failure with an .xls template in the reported ASP.NET scenario. Trace why CompoundDocument constructs a BinaryWriter over a non-writable stream; done means the template loads into a workbook without the “Stream was not writable” exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100