Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I get a serries of values from db. And i want to write these values to cells
in a sheet. For example i will start from A1 and i will write 10 values through A1-A10. I am new in this kind of excel programming. May be it is an easy question but i fail. What should i do, to do that? Thanks a lot... |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
show the code that gets the values from db.
Otherwise, look at example code for use ADO to read a data set: http://www.rondebruin.nl/accessexcel.htm http://www.erlandsendata.no/english/...php?t=envbadac -- Regards, Tom Ogilvy "basulasz" wrote: I get a serries of values from db. And i want to write these values to cells in a sheet. For example i will start from A1 and i will write 10 values through A1-A10. I am new in this kind of excel programming. May be it is an easy question but i fail. What should i do, to do that? Thanks a lot... |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I use c# and VSTO, here is the code;
sqlCommand1.CommandText = txtQuery.Text; sqlConnection1.Open(); SqlDataReader dr_Read = sqlCommand1.ExecuteReader(); while (dr_Read.Read()) al_Fiy.Add(dr_Read[0].ToString()); dr_Read.Close(); sqlConnection1.Close(); I just write values to an arraylist; And i think i should use a Named Range like this Microsoft.Office.Tools.Excel.NamedRange nr = this.Controls.AddNamedRange(this.Range["B9",missing], "NamedRange1"); nr.Value2 = "Hello World"; writing values begginning from B9 and up to end of the arraylist is my problem |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I don't currently use C# and/or VSTO, so I don't have any advice for you.
Most questions in this group are about VBA, so you would do well to state in your initial post that you are using C# and VSTO and you will have better luck getting a response from someone who can answer your question. Sorry. -- Regards, Tom Ogilvy "basulasz" wrote: I use c# and VSTO, here is the code; sqlCommand1.CommandText = txtQuery.Text; sqlConnection1.Open(); SqlDataReader dr_Read = sqlCommand1.ExecuteReader(); while (dr_Read.Read()) al_Fiy.Add(dr_Read[0].ToString()); dr_Read.Close(); sqlConnection1.Close(); I just write values to an arraylist; And i think i should use a Named Range like this Microsoft.Office.Tools.Excel.NamedRange nr = this.Controls.AddNamedRange(this.Range["B9",missing], "NamedRange1"); nr.Value2 = "Hello World"; writing values begginning from B9 and up to end of the arraylist is my problem |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Writing a UDF | Excel Discussion (Misc queries) | |||
Writing UDF Help | Excel Discussion (Misc queries) | |||
writing formulas in VB - referring to the values contained in cell | Excel Programming | |||
Writing values to worksheet from array | Excel Programming | |||
Writing values to Web Forms | Excel Programming |