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:

Anonymous said...

Thanks man !

Research Paper Frenzy said...

I am glad you made it. Thanks a million.

Anonymous said...

the method WriteToFile doesnt works thanks for wasting my time

Brad said...

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

Unknown said...

Can we do in Reverse CSV to XLX

Brad said...

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

Unknown said...

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

writing tips said...

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

coursework Writing Service

fillikir72518 said...

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

Sahib Khan said...

apple black friday sales
black friday nike sale air max
black friday 2020 go pro
single cup coffee maker black friday
best buy black friday printer

apple black friday sales
black friday nike sale air max
black friday 2020 go pro
single cup coffee maker black friday
best buy black friday printer