Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best free Excel writer for C# to output datatable to excel

Tags:

c#

excel

writer

I've got a console app that loads up a datatable; I'd like to export that to an Excel format and attach it to an email that's sent out on a regular basis.

What is the best library to do so that I can pull down for free? I'm working for an academic institution and we don't have a budget for third-party controls.


possible related question: How to store data to Excel from DataSet without going cell-by-cell?

like image 460
Caveatrob Avatar asked May 27 '09 08:05

Caveatrob


People also ask

Can I use C in Excel?

The Excel C API is the ideal choice when you want to create high-performance worksheet functions by creating XLL add-ins. The C API provides you with the most direct access to worksheet data. XLLs provide Excel with the most direct access to the DLL resources.

Is there a program like Excel for free?

Very similar in appearance and functionality to Excel, Google Sheets is probably the most popular Excel alternative. It offers timesaving features similar to Excel's, such as charts and graphs, built-in formulas, pivot tables and conditional formatting. It's available for free to anyone who has a Google account.

How can I edit Excel for free?

The free, web-based Google Docs Editors package comes with a spreadsheet tool called Google Sheets which allows you to edit and create excel files online. Here is how you can create and edit excel files online with google sheets.


2 Answers

Another free lib is CarlosAg Excel Xml Writer Library. Supports the new xml-based format.

Clarification: as we are talking about MS Excel here the new xml-based format is MS Office XML.

like image 114
Peter Lillevold Avatar answered Oct 20 '22 17:10

Peter Lillevold


I would just write a CSV file to the hard drive.

like image 20
Galwegian Avatar answered Oct 20 '22 17:10

Galwegian