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.
Unfortunately, activation email could not send to your email. Please try again.

Copy row to new row in different Workbook

Thread ID:

Created:

Updated:

Platform:

Replies:

108878 May 16,2013 11:17 PM May 30,2013 12:40 AM WPF 3
loading
Tags: XlsIO
Daniel Di Giandomenico
Asked On May 16, 2013 11:17 PM

Hi,

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: 

http://help.syncfusion.com/ug/wpf/xlsio/default.htm#!documents/howtocopyarangefromoneworkbooktoanother.htm 

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,

Daniel 

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

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:
https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

 

Please let us know if you need any clarifications.

 

Thanks,

Manikandan M.


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

Hi,

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.

Thanks


WorksheetCopyExample_456ab373.rar

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

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.

Regards,
Manojkumar.


CONFIRMATION

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.

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.

;