This project has moved. For the latest updates, please go here.


Cannot save the file 2nd time after deleting the rows


If we run this project 2nd time it hangs near the Save()
Please change the location of the data in the app.config file and run it.
Thanking you

file attachments

Closed Apr 25 at 9:39 PM by igitur
Please try the latest version of ClosedXML (v0.87.1 at this stage). If you still experience the issue, log it on the new GitHub page.


MDeLeon wrote Sep 13, 2012 at 4:32 AM

I don't get any errors with that project...

mnvraghuram wrote Sep 13, 2012 at 4:34 AM

Please put a break point while its saving it saves for the 1st time and run the project 2nd time it will hang.


MDeLeon wrote Sep 13, 2012 at 4:43 AM

I still don't understand, I ran the project twice without a problem.

mnvraghuram wrote Sep 13, 2012 at 4:47 AM

Thank you so much for your patience if its fine i would love to show it in teamviewer is that fine.

mnvraghuram wrote Sep 13, 2012 at 4:52 AM

got it in the files sent you are not having the following excel file please place the following xlsx file in the final folder

Note: after the file has been saved after 1st time if you open the file normally using excel too it opens and then save it and try to open it again it gives an error stating invalid data.


mnvraghuram wrote Sep 13, 2012 at 4:54 AM

please put the breakpoint at line 291

mnvraghuram wrote Sep 13, 2012 at 5:19 AM

Hi MDeLeon
Are you able to reproduce it please sorry for the inconvenience

MDeLeon wrote Sep 13, 2012 at 5:54 AM

Yup, already got it opening and saving it in 12s. I'll see if there are any other quick things I can do before going to bed.

MDeLeon wrote Sep 13, 2012 at 6:02 AM

Pick up the latest source code. It's still slow but you can probably deal with it until I have more time to tackle the problem.

mnvraghuram wrote Sep 13, 2012 at 2:01 PM

Hi MDeleon
Thank you so much for your help and support. Now its saving multiple times no issues but if we open the saved excel file and do ctrl+S to save manually and then try to open the file with MS Excel it does't it gives the following error as attached screen shot and i even noticed that the file size is increasing for every save

mnvraghuram wrote Sep 14, 2012 at 7:48 PM

Hi MDeleon
Sorry for troubling you are you also having this issue please kindly confirm. i.e. opening the file after the process has run and do a regular save and try to open the excel manually

MDeLeon wrote Sep 17, 2012 at 9:49 PM

I can open the file and save it multiple times and Excel can open it no problem. Are you sure you're using the latest version?

mnvraghuram wrote Sep 24, 2012 at 6:32 PM

Hi MDeLeon
I got the latest version itself onceagain today i will download the latest version from
Is this the correct location please kindly let me know


MDeLeon wrote Sep 24, 2012 at 7:04 PM

nickoloj0n wrote Nov 27, 2012 at 12:49 PM


I'm experiencing the same problem, here is a brief description of the application I'm working on. I have a table in the page with a list of data that can be filtered. At any given time a user can extract the data from the table and export it in an excel file. I used closedXML for this functionality and I successfully saved an excel file containing the data. The problem is, I tried filtering the table and tried exporting again, but the export process didn't finish. I logged every step of the method and it stops when the file is being saved calling the "SaveAs" function. So basically the 2nd attempt of exporting file always hang in the "SaveAs" function, I already downloaded the latest version of closedXML and I still encountered this issue. I will attach a txt document containing the method that creates the excel file. Hope to here from you soon.


nickoloj0n wrote Nov 27, 2012 at 2:05 PM


Please disregard my question, I already solved the issue, it was the folder security/permission in the server.