Tuesday, March 27, 2012

Using EPPlus Library to Convert XLSX to CSV

The EPPlus library for Excel data is great, but it has no built-in functionality for converting .xlsx to .csv.

Here is a sample (posted here because I discovered a pitfall, and it's not a slam dunk) for doing just that.  It's a single file, console app, just add EPPlus via nuget.

Update: Prior code was no good for large files (and said so).  Updated to work with giant files.


10 comments:

  1. Anonymous3:49 AM

    Thanks man !

    ReplyDelete
  2. I am glad you made it. Thanks a million.

    ReplyDelete
  3. Anonymous10:15 AM

    the method WriteToFile doesnt works thanks for wasting my time

    ReplyDelete
  4. And thank you, anonymous, for letting me know what the bug is so future visitors can benefit!

    ReplyDelete
  5. Can we do in Reverse CSV to XLX

    ReplyDelete
  6. If you're able to use Excel automation / interop it's a snap: http://stackoverflow.com/questions/16732343/converting-excel-file-from-csv-to-xlsx

    ReplyDelete
  7. Thanks Brad, I've extended this a little with an extension method approach available here: https://gist.github.com/andrewmurray/b63b7592386cb67124d1

    ReplyDelete
  8. This post truly made my day. You can’t imagine just how much time I had spent for this information! Thanks

    coursework Writing Service

    ReplyDelete
  9. you may have an amazing weblog here! would you prefer to make some invite posts on my weblog? gsn casino

    ReplyDelete