jatpat / excellibrary

Automatically exported from code.google.com/p/excellibrary
0 stars 0 forks source link

Unable to load a file #28

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. use this code on a web project
 private void Calculate2()
    {
        //Locate an xcel file in your server and map that filepath
        string filePath = "~\\Files\\myXcl.xls" //just for example
        string serverPath = MapPath(filePath);

        Workbook workbook = Workbook.Load(serverPath); //exception thrown
        //Assert.AreEqual(1, workbook.Worksheets.Count);

        Worksheet worksheet = workbook.Worksheets[0];
        ////Assert.AreEqual("Test1", worksheet.Name);
        //Assert.AreEqual(100, worksheet.Cells[0, 1].Value);
        //Assert.AreEqual("Test String", worksheet.Cells[2, 0].Value);

    }
2.
3.

What is the expected output? What do you see instead?
I expect the library to succesfully open this file, I need to find some 
cells info Instead I get this exception: Unable to read beyond the end of 
the stream.

I try using a FileStream  and open the file in Read Mode but then it said 
that it can not fiond the end of the stream. 

What version of the product are you using? On what operating system?
the one included un the release folder of the solution in this file : 
ExcelLibrary_20090331.zip   Archived project code on 2009-03-31.

Please provide any additional information below.

I have all the permissions in the folder.

Original issue reported on code.google.com by ricker.s...@gmail.com on 2 May 2009 at 12:45

GoogleCodeExporter commented 9 years ago
Implement the solution I provided at this post. It should solve your issue.

http://code.google.com/p/excellibrary/issues/detail?id=51&colspec=ID%20Type%20St
atus%20Priority%20ReportedBy%20Owner%20Summary%20Opened

Original comment by ihsan...@gmail.com on 26 Nov 2009 at 2:32