locked
Microsoft.Office.Interop.Excel.Worksheet does not contain a definition for InsertRow RRS feed

  • Question

  • I want to dynamically insert few rows in an excel sheet , but when i tried to use the below code as suggested over one of the forums  but its throwing an error.

    //Inserting 10 rows into the worksheet starting from 3rd row
    
     worksheet.Cells.InsertRows(2,10);
    
    Microsoft.Office.Interop.Excel.Worksheet doesnot contain a definition for 'InsertRow' 
    and no extension method 'InsertRow' acceping a 1st argument of type 'Microsoft.Office.Interop.Excel.Worksheet' 

    can any one help me in this...


    • Edited by Sanjeev89cs Friday, February 5, 2016 7:03 AM
    Friday, February 5, 2016 7:03 AM

All replies

  • Hi Sanjeev,

    I recommend posting this in the Excel developers forum. This is the forum for Microsoft Translator.

    Chris Wendt
    Microsoft Translator

    Sunday, February 7, 2016 12:37 AM