We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Copy row to new row in different Workbook

Thread ID:





108878 May 17,2013 03:17 AM UTC May 30,2013 04:40 AM UTC WPF 3
Tags: XlsIO
Daniel Di Giandomenico
Asked On May 17, 2013 03:17 AM UTC


I am currently developing an application that scans through an excel document and updates a database with the data from each row. As a form of error reporting, any row that returns errors upon processing I would like copied to a new Workbook.

I am trying to figure out how to achieve this. The closest I have come so far would be to use the CopyTo method as defined here: 


In this method however you need to specifically define the IRange in the destination workbook. What I want to happen is the new row just be placed under an existing row. I.e. 3 errors will result in three rows one after the other. 

Advice on the easiest way to achieve this will be much appreciated. Thanks in advance,


Manikandan M [Syncfusion]
Replied On May 20, 2013 04:14 PM UTC

Hi Daniel,


Thanks for using Syncfusion products.


We can achieve your requirement by copying the row of source workbook to destination workbook. Whereas when copying so, we could see the ‘Index outside the bounds of the array’ at our side. We suspect that this could be a defect. So we request you to create the new incident to further follow up on this issue.


Direct-Trac Link:


Please let us know if you need any clarifications.



Manikandan M.

Daniel Di Giandomenico
Replied On May 22, 2013 06:00 AM UTC


I am just wondering what was the code that you used to get the error you received? My problem was not knowing what value to use as the destination range that would result in the data being placed in the next available row in the destination workbook. 

What I want to do is something like this

IRange des = DestinationWorksheet.Range[NextAvlaibleEmptyRow];

I have attached a Workbook with an example of the result I would like.



Manoj Kumar G M [Syncfusion]
Replied On May 30, 2013 04:40 AM UTC

Hi Daniel,

Thank you very much for your patience.

We are afraid that we are not able to reproduce the issue at our end, so we request you to create the new incident and provide us detailed information on your scenario with full source code or simple sample which could be helpful to analysis further on this issue.

Direct-Trac Link:

Please let us know if you need any clarifications.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon