Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Writing a serries of values...

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Writing a serries of values...

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Writing a serries of values...

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Writing a serries of values...

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Writing a UDF Hajiki Excel Discussion (Misc queries) 3 June 16th 08 06:18 PM
Writing UDF Help jlclyde Excel Discussion (Misc queries) 4 April 22nd 08 08:30 PM
writing formulas in VB - referring to the values contained in cell Josie Excel Programming 4 March 5th 06 06:34 PM
Writing values to worksheet from array interstellar Excel Programming 6 September 12th 05 07:00 PM
Writing values to Web Forms Brian Lopez Excel Programming 5 November 1st 03 05:41 PM


All times are GMT +1. The time now is 01:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"