I have used as a base for what I want to do this site:
http://www.codeproject.com/script/Articles/ViewDownloads.aspx?aid=8500
So basically, I want to use OleDb in my C# Windows form application to add some data to specific cells in my existing Excel spread sheet. All the examples I find want me to have some type of header cells. Like if my ‘A1’ cell had “Title” in it I could use:
"INSERT INTO [SHEET1$] (Title) Values ('Book')"
The problem is that my Excel spread sheet does not have any header. What I need is to do:
"INSERT INTO [SHEET1$] (A15) Values ('Book')".
Can someone help me figure out how to put data in specific cells around my spread sheet?
If you are still interested,
There is no real way to specify a cell to write to using OleDb Insert Command, the OleDbCommand will automatically go to the next open row in the specified column. However you can use an Update Query such as:
This should work given you’ve defined: