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. Image for the cookie policy date
close icon

Copying a range from one workbook to another

Hi,

The following code does not work if the row variable is more than 256

sourceRange = sourceSheet.Range[1,1, row, 100]
targetRange = targetSheet.Range[1,1, row, 100]

sourceRange.CopyTo(targetRange, ExcelCopyRangeOptions.All)

Though the range variables are not null, I find that the CopyTo method alone fails if the range to be copied exceeds the 256th row. This happens only when a range is copied from one workbook to another. Within the same workbook, and different sheets,I am able to copy more than 256 rows.

I am using Syncfusion XlsIO version 4.4

Is there a workaround for this?

I have tried traversing through the range of cells and copying individual source range cell to target range cell.
I have also tried copying the ranges in batches of 256. None of my trials work.

Regards,


3 Replies

SB Sathish Babu R Syncfusion Team October 11, 2010 06:21 AM UTC

Hi Lisa McCabe,

Thank you for your interest in Syncfusion products.

We were able to reproduce the mentioned issue at our side and this issue has been fixed in our latest version (8.3.0.21). So, we request you to upgrade your current Essential studio version to 8.3.0.21. We have created the sample and tested with the assembly 8.3.0.21. Could you please let us know if this helps you.

Tested Sample:
http://help.syncfusion.com/samples/xlsio.windows/supports/F96815.zip

Could you please let us know if you have any queries?

Regards,
Sathish




LM Lisa McCabe October 11, 2010 09:36 PM UTC

Hi Satish,

Thanks for the update.
Is there any good workaround in version 4.4 ?
Is there any other way of mass input like CopyTo?

-Thanks



SB Sathish Babu R Syncfusion Team October 12, 2010 11:33 AM UTC

Hi Lisa McCabe,

We share general information on the forum. Could you please open the new incident in Direct Trac Developer Support System?
https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents so that we can provide you with the patch for this issue as well as you can take the advantage of the expertise of a dedicated support engineer and a guaranteed response time and we hope you will take advantage of this system as well.

CopyTo Method:

In our XlsIO, currently we do not have equivalent of CopyTo method.

Could you please let us know if you have any queries?

Regards,
Sathish



Loader.
Live Chat Icon For mobile
Up arrow icon