0

Hi,
Im working with an excel file. For exampler there is 500 rows in the sheet and 4 columns in the sheet. First 3 columns have data but 4th columns is empty. I want to write this column's all rows' "1. row", "2. row", "3.row"...
My codes below.. How can i do that?

4.th colon
-------
1.row
2.row
3.row
...
------

string query_ci = "SELECT [Kolon1],[Kolon2],[Kolon3] FROM[Sheet6$A:J] WHERE [Kolon1]='" + kolon_bul+ "'";
                OleDbDataReader rdr_ci;
                OleDbCommand komut_ci = new OleDbCommand(query_ci, conn);
                rdr_ci = komut_ci.ExecuteReader();
                int a=0;
                while (rdr_ci.Read())
                {

                        OleDbCommand komut = new OleDbCommand("UPDATE [Sheet6$] SET [Kategori]='"+a.ToString()+ column"' WHERE="??????"  ", baglanti);     ----> What should be here?
                        komut.ExecuteNonQuery();
                a += 1;
 
               }
3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by Cort3z
0

"where row = '4'"? It is hard to interpret your code. Sounds like you have a sql-issue, not a C# issue.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.