Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Insert a blank row in excel

Reply
Thread Tools

Insert a blank row in excel

 
 
Andy
Guest
Posts: n/a
 
      05-24-2004
I am inserting data in an excel spreadsheet using .net and need to insert a blank row. Can somebody please help me with the code to do so?
 
Reply With Quote
 
 
 
 
Ken Cox [Microsoft MVP]
Guest
Posts: n/a
 
      05-26-2004
It would help to know how you are inserting the other data.

"Andy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I am inserting data in an excel spreadsheet using .net and need to insert a
>blank row. Can somebody please help me with the code to do so?


 
Reply With Quote
 
 
 
 
Andy Bolk
Guest
Posts: n/a
 
      05-26-2004
Here is a sample of code that I am using to populate the rows. I am
looping through my dataset and using the following

oSheet.Range("A" & 25 + i).Value = myds.Tables(0).Rows(i)("ID")
oSheet.Range("B" & 25 + i).Value =
myds.Tables(0).Rows(i)("InvolvedPerson")
oSheet.Range("C" & 25 + i).Value =
myds.Tables(0).Rows(i)("InvolvedPersonTitle")
oSheet.Range("D" & 25 + i).Value =
myds.Tables(0).Rows(i)("IncidentDateTime")
oSheet.Range("E" & 25 + i).Value =
myds.Tables(0).Rows(i)("LocationName")
oSheet.Range("F" & 25 + i).Value =
myds.Tables(0).Rows(i)("InjuryDescription") & "," &
myds.Tables(0).Rows(i)("OSHAObject") & BodyParts


Any help you can offer is appreciated.



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
HOWTO: FormView Insert Operation - Get Row ID of Inserted Row Dan Sikorsky ASP .Net 2 04-30-2009 09:50 PM
export to excel with a blank row shown top--how to get rid of it? =?Utf-8?B?RGFpc3k=?= ASP .Net 0 08-23-2007 03:24 PM
Insert blank row in Grid View Control: probashi ASP .Net 0 12-15-2006 03:22 AM
insert blank row between records mark ASP .Net Datagrid Control 2 05-26-2004 11:59 AM
Insert new row before current row Andrus Javascript 0 06-29-2003 10:34 PM



Advertisments