svn2github / npoi

This is a clone of an SVN repository at http://npoi.googlecode.com/svn/trunk/. It had been cloned by http://svn2github.com/ , but the service was since closed. Please read a closing note on my blog post: http://piotr.gabryjeluk.pl/blog:closing-svn2github . If you want to continue synchronizing this repo, look at https://github.com/gabrys/svn2github
Other
59 stars 50 forks source link

XLSX files corrupted after saving with NPOI #26

Open leofucci opened 6 years ago

leofucci commented 6 years ago

So basically these are my steps

  1. Create an xlsx with excel online, nothing to fancy, just 2 columns, I added some data on those columns.
  2. Download this xlsx from oneDrive.
  3. Open with NPOI this excel, try to read data, success on this step.
  4. Try to update an existing value with another value.
  5. Try to read the cell I just updated, I can get updated value properly.
  6. Save the excel.
  7. Open excel again, try to read updated value, I get lattest value I updated properly.
  8. Upload this file to OneDrive and try to open it. ERROR: It says something like "Maybe file is corrupted, would you like to open it on excel?"
  9. Try to open it on a Desktop excel, it says same thing, file is corrupt.
  10. Strange thing is that NPOI can still read this 'Corrupt' file without problems...

Please find attached, corrupted excel on this example. ExcelCorruptedFile.xlsx

FYI, same code but using XLS class (no XLSX) works fine, I create a IWorkbook object that decides if should be XLSX or XLS handling, exactly same code for XLS works perfect.

regards. Leonardo

emdzzl commented 6 years ago

I had the same problem

marcosbrinner commented 6 years ago

I had the same problem

Hey, I was having a similar problem, that the file was corrupted check if your dependence SharpZipLib is setted to version 0.86.0 and not to 1.0.0 cause it may cause a bad compression on your file NPOI doesn't work properly within the lastest version of SharpZip

tonyqus commented 5 years ago

hello, this repo is for synchonization from svn to github only. Please go to https://github.com/tonyqus/npoi/issues to create your issue.