Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel query insert

I want to insert a new row into excel sheet after reading from few text boxes in my C# windows application.
The sheet has already few lines so I need to find the last row to be written and insert m y data.
i found the last row from the below code

Microsoft.Office.Interop.Excel.Range rowrange = workSheet.Cells.Find("*", System.Reflection.Missing.Value,
System.Reflection.Missing.Value, System.Reflection.Missing.Value, Microsoft.Office.Interop.Excel.XlSearchOrder.xlByR ows, Microsoft.Office.Interop.Excel.XlSearchDirection.x lPrevious, false, System.Reflection.Missing.Value, System.Reflection.Missing.Value);

Now i need to insert the data from my text boxes into the next row on click of a button




Submitted via EggHeadCafe - Software Developer Portal of Choice
Get Silverlight 4 Installed: Tips and Tricks
http://www.eggheadcafe.com/tutorials...4-install.aspx
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel query insert


Use offset to get next cell

rowrange.offset(1,0)


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?u=229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=196332

http://www.thecodecage.com/forumz

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
Insert subtotal in a query database Excel 2007 Scotty Tibbs II Excel Worksheet Functions 3 September 12th 09 12:50 AM
Excel query then insert row CJA Excel Programming 0 June 3rd 08 06:03 AM
Using ADO with INSERT query todtown Excel Programming 0 August 18th 07 01:48 AM
Using ADO with INSERT query todtown Excel Programming 0 August 18th 07 01:48 AM
Using ADO with INSERT query todtown Excel Programming 0 August 18th 07 01:48 AM


All times are GMT +1. The time now is 04:19 PM.

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

About Us

"It's about Microsoft Excel"