I am trying to read from a Excel document. I found a good tutorial at http://www.codeproject.com/KB/office/csharp_excel.aspx. I don't know why it is not working. I have added the reference for sure. I can see it it my solution explorer. I have added the using Excel line and but it doesn't show up in my autofill while I type. When I add the next line in the tutorial it says that I have not included the namespace. Any advice or better tutorials to look at. I will keep searching in the meantime and thanks. This is my code
using
System;using
System.Collections.Generic;using
System.ComponentModel;using
System.Data;using
System.Drawing;using
System.Linq;using
System.Text;using
System.Windows.Forms;using
Excel;namespace
IOListRebel{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
Excel.Application excelApp =
new Excel.ApplicationClass(); private void button1_Click(object sender, EventArgs e){
}
}
}
Mahesh ChandPosted Apr 9, 2009, 9:57 PM
Here are some articles with source code:
Most of the time you will use SQL, Oracle, Access or some other database to store data. But it is possible to use Excel spreadsheet much like a database to stored data. This article and code will explain how to do this in C#.
The Interoperability services make it very easy to work with COM Capable Applications such as Word and Excel.