How can I create an Excel compatible Spreadsheets on the server side in C#?

I ‘d like to make server-side stand out suitable spreadsheets that possibly utilize OpenXML or a structured information format.

I have actually utilized Office Interop before to create Excel spreadsheets, however those apps operate on a PC that has actually office installed.

For this web task I’m constructing, the server doesn’t have actually Office set up (and they don’t wish to purchase it).

Exactly what’s the very best library for me to utilize that permits me to generate Office compatible spreadsheets from a windows server 2k8 utilizing IIS7 in

Microsoft published the OpenXML SDK.

Alternatively download the OpenXML schemas, create basic examples with Office and use them as a structure to compose your very own XML files – its not that complicated.

You could use the NPOI library.

Free, Open source and supports reading and composing Excel, Word and Powerpoint files

A very easy service is:

You can build the content of the spreadsheet as a html table. Return the table to the web browser with the proper headers set.

Checkout my post Reading Excel Files as a Server Process for a list of some paid ones.

The one I decided for named FlexCel was very easy to utilize, allowed solutions to be used at run-time, was totally handled and low cost/royalty totally free.

I am using Microsoft.Office.Interop.Excel and producing Excel files using the SaveAs approach. This all works properly on computer with Excel set up. Nevertheless, my server does not have actually Excel set up.

, if you create a file using Interop you require to install Excel on the server.


Microsoft does not support installing Excel (or Word) on the server. Instead you should download the Office Open XML SDK from Microsoft and use that library to create Excel 2007 files. This library does not need Excel to be installed on the server:

If you are talking about Excel prior to MS Office 2010, there is no set of “client libraries” that can be utilized to develop Office documents.
“Interop” assemblies are wrappers around Microsoft’s unmanaged code, that make the Excel API readily available customers.
You will have to install MSOffice on the server.

, if you are okay with the new Open Office Xml format (xlsx) I would extremely recommend taking a look at the free.Net library EPPlus.. It is simple to utilize and has a lots of features.

If you just require information in the files and no charts etc, I would just go with XML or CSV format. Both are open formats and do not require interop binaries.

Leave a Reply

Your email address will not be published. Required fields are marked *