This project has moved and is read-only. For the latest updates, please go here.

Error when I try to open an Excel document.

Feb 10, 2011 at 8:14 AM

I get the error "Value was either too large or too small for an Int32." when I run the following code:

var workbook = new XLWorkbook("C:/mall.xlsx");



This Excel document is Empty and I´ve opened it and saved it in Excel without problems.

I can open other documents with ClosedXML. Anyone that have encountered this error?

Thanks, Niklas.

Feb 10, 2011 at 3:00 PM
Edited Feb 10, 2011 at 6:11 PM



var workbook = new XLWorkbook(@"C:\mall.xlsx");


Feb 14, 2011 at 6:59 AM

I got the same error.

I guess my Excel document is corrupted some way.

Feb 14, 2011 at 7:13 AM

I'd like to take a look at the file you're trying to open. Please create a ticket on the Issue Tracker tab and attach your file.


Feb 15, 2011 at 5:07 PM

Fixed on v0.45.1

Thanks for the feedback.

Feb 18, 2011 at 2:06 PM

Hello, found another Exceldocument that didn´t open. I have downloaded the latest version of closedxml.

var temp = new XLWorkbook(




I get an error saying {"Input string was not in a correct format."} when I run the code above.

I will create a ticket on the Issue Tracker tab with the file.

Sep 12, 2012 at 3:49 PM


I'm also having the same error "Input string was not in a correct format." when trying to open a file. The file has opened before, now I get this error and cannot figure out whats wrong.

nicke82 did you manage to get a solution to this?

Sep 12, 2012 at 4:07 PM

Hi Peter, please create an issue and attach a file that gives you the error.