Insert a blank row in excel

A

Andy

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?
 
A

Andy Bolk

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top