Insert a blank row in excel

Discussion in 'ASP .Net Web Controls' started by Andy, May 24, 2004.

  1. Andy

    Andy Guest

    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?
     
    Andy, May 24, 2004
    #1
    1. Advertising

  2. It would help to know how you are inserting the other data.

    "Andy" <> wrote in message
    news:...
    >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?
     
    Ken Cox [Microsoft MVP], May 26, 2004
    #2
    1. Advertising

  3. Andy

    Andy Bolk Guest

    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!
     
    Andy Bolk, May 26, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dan Sikorsky
    Replies:
    2
    Views:
    11,564
    SiliconViper
    Apr 30, 2009
  2. probashi
    Replies:
    0
    Views:
    744
    probashi
    Dec 15, 2006
  3. =?Utf-8?B?RGFpc3k=?=
    Replies:
    0
    Views:
    817
    =?Utf-8?B?RGFpc3k=?=
    Aug 23, 2007
  4. mark

    insert blank row between records

    mark, May 25, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    2
    Views:
    155
    Rick Spiewak
    May 26, 2004
  5. Andrus

    Insert new row before current row

    Andrus, Jun 29, 2003, in forum: Javascript
    Replies:
    0
    Views:
    122
    Andrus
    Jun 29, 2003
Loading...

Share This Page