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

Copystyle and DataSet size limit ?

Thread ID:





69126 Oct 16,2007 07:36 AM UTC Oct 26,2007 02:52 PM UTC ASP.NET Web Forms (Classic) 4
Tags: XlsIO
Asked On October 16, 2007 07:36 AM UTC


When I export a dataset of 5000 rows in a template with a copystyle tag it crashes on an index error.

When I export the same file just by removing the copystyle tag in the template it works.

Is it a known issue or there's another way to do a copystyle ?

Replied On October 16, 2007 08:58 AM UTC

That's ok I've switched to 5.2

Replied On October 16, 2007 09:48 AM UTC


In fact it doesn't work.

When I use a dataset of 5000 rows I have a thread aborted. And never get my file.

What is the size limit that can be imported ? How to import 5000 rows in an excel file with coystyle ?

Replied On October 16, 2007 12:33 PM UTC

I tried spliting the variable every 1000 items but it still thread abort when applymarker.

Here is the code for you to understand what I've tried :

int pageSize = 1000;
decimal numberOfPages = Math.Truncate((decimal)(dsItems.Tables[0].Rows.Count / pageSize));
numberOfPages += dsItems.Tables[0].Rows.Count % pageSize > 0 ? 0 : 1;
IRange rangeFrom = sheet.Range[2, 1, 2, 12];
IRange rangeTo = sheet.Range[10000, 1, 10000, 12];
rangeFrom.CopyTo(rangeTo, ExcelCopyRangeOptions.All);
rangeFrom = rangeTo;

for (int i = 0; i < numberOfPages; i++)
dsItems.Tables[0].Select("rank > " + (i * pageSize).ToString() + " AND rank < " + ((i * pageSize) + (pageSize - 1)).ToString());
rangeTo = sheet.Range[i * pageSize + 2, 1, i * pageSize + 2, 12];
rangeFrom.CopyTo(rangeTo, ExcelCopyRangeOptions.All);
for (int j = 1; j <= 12; j++ )
rangeTo["RC" + j.ToString(), true].Text = rangeTo["RC" + j.ToString(), true].Text.Replace("Item", "Item" + i.ToString());
marker.AddVariable("Item" + i.ToString(), dsItems.Tables[0]);

Melba Winshia [Syncfusion]
Replied On October 26, 2007 02:52 PM UTC

Hi Greg,

We regret for the delayed response.

I am afraid that I was not able to reproduce the issue "Thread aborted" when we use 5000 rows with copy style and ApplyMarker. Also I have a simple sample and it is available in the below link:


Please have a look at the above sample and if still the issue exists, could you please try reproducing it in the above sample and send us the modified sample so that we could sort out the cause of the issue and provide you a solution?

Best Regards,


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

or the page will be automatically redirected to 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