Spire.XLS for .NET is a professional Excel .NET library that can be used to any type of .NET( C#, VB.NET, ASP.NET, .NET Core) application and Java (J2SE and J2EE) application.

Wed Feb 20, 2013 5:08 pm


I am migrating to generate reports in a web-service and am having a strange problem that occurs sometimes, other times not, file is ok.

Apparently the Spire.XLS is keeping the file in use after closing, and the result is a corrupted file.

20 times reapeting same operation, at least about 5 this kind of problem occurs.

I'm using version

I tried to migrate to the latest version which I am entitled, but there was another problem with special characters, as well as the problem of file in use also occurred.

What can I do?

Posts: 4
Joined: Tue Sep 13, 2011 9:53 pm

Thu Feb 21, 2013 7:15 am


Thanks for your inquiry.
Please try the solution below to load your excel document.
Code: Select all
              using (Workbook workbook = new Workbook())
                        byte[] bytes = File.ReadAllBytes(excelfilePath);
                        using (Stream stream = new MemoryStream(bytes))

Please tell us if you still have the problem after try the code above.

Best Regards,
E-iceblue support team
User avatar

Posts: 2470
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.XLS