giautm / excellibrary

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

OutOfMemoryException while opening .xls file that is already opened in MS Office for reading/writing #138

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. I've got OutOfMemoryException when opening a file that is already opened in 
MS Office for reading/writing.
        public bool open(string fileName)
        {
            try
            {
                Workbook book = Workbook.Load(fileName);
                xlSheets = book.Worksheets;
            }
            catch (OutOfMemoryException) // it means that file is already opened in my case (sometimes it can means other I suppose)
            {
                return false;
            }
            return true;
        }

2.
3.

What is the expected output? What do you see instead?
It will be great if I be able to set up 'read only' file opening mode option in 
such cases to avoid exception above in one case and to work vs already opened 
files in another case. 

What version of the product are you using? On what operating system?
I'm using ExcelLibrary_20110730 on Windows7 professional sp1. 

Original issue reported on code.google.com by solarisf...@gmail.com on 13 Aug 2012 at 3:21

GoogleCodeExporter commented 8 years ago
I'm very sorry for mistake! Change everywhere in text "OutOfMemoryException" to 
"IOException"!

Original comment by solarisf...@gmail.com on 13 Aug 2012 at 7:56

GoogleCodeExporter commented 8 years ago

Original comment by jetcat on 1 Mar 2013 at 11:02