Copy row to new row in different Workbook
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
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,
Advice on the easiest way to achieve this will be much appreciated. Thanks in advance,
Daniel
SIGN IN To post a reply.
3 Replies
MM
Manikandan M
Syncfusion Team
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:
https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents
Please let us know if you need any clarifications.
Thanks,
Manikandan M.
DD
Daniel Di Giandomenico
May 22, 2013 06:00 AM UTC
Hi,
WorksheetCopyExample_456ab373.rar
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
MK
Manoj Kumar G M
Syncfusion Team
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.
Regards,
Manojkumar.
SIGN IN To post a reply.
- 3 Replies
- 3 Participants
-
DD Daniel Di Giandomenico
- May 17, 2013 03:17 AM UTC
- May 30, 2013 04:40 AM UTC