Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
470
Can we copy a row from excel sheet to another excelsheet
posted

Can we copy a row from excel sheet to another excel sheet, keeping all the cell validations and formatting ?

Like,

NewWorkSheets[0].Rows[0] = WorkSheets[0].Rows[0];

Or do I have to do it manually ? copy value from each cell and all ???

Parents
No Data
Reply
  • 17590
    Suggested Answer
    Offline posted

    Hello Vaishvnavi,

    Thank you for posting in the community.

    By design Rows collection of is a read only collection which means that values could not be assigned to items from this collection.

    What I can suggest for achieving your requirement is is manually setting cell values. For example:

    voWBook.Worksheets[1].GetCell("A1").Value = voWBook.Worksheets[0].GetCell("A1").Value;

    I also made a small sample illustrating my suggestion and I am attaching it for your reference.

    Some further reference about Infragistics Excel Engine could be found at:

    http://help.infragistics.com/doc/ASPNET/2014.2/CLR4.0/?page=ExcelEngine_Using_the_Infragistics_Excel_Engine.html

    Please let ne know if you need any further assistance with this matter.

    ExcelEngine.zip
Children