Depending on what you are trying to do, such as creating an XLSX document, you may use the Open XML SDK .
This is good for creating office documents; especially because it does not require the installation of an office for use.
It's free; nice clean API and supported by Microsoft. For instance:
public static void CreateNewWordDocument(string document) { using (WordprocessingDocument wordDoc = WordprocessingDocument.Create(document, WordprocessingDocumentType.Document)) {
Example from: http://msdn.microsoft.com/en-us/library/bb497758.aspx . There are examples for working with tables here .
If you are trying to interact directly with Excel (for example, automation of the user interface); Do not create a document then KeithS answer is how I go.
source share