- Home
- Forum
- ASP.NET Web Forms (Classic)
- Copystyle and DataSet size limit ?
Copystyle and DataSet size limit ?
Hi,
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 ?
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 ?
SIGN IN To post a reply.
4 Replies
GD
gdo
October 16, 2007 08:58 AM UTC
That's ok I've switched to 5.2
GD
gdo
October 16, 2007 09:48 AM UTC
No,
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 ?
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 ?
GD
gdo
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]);
}
sheet.DeleteRow(10000);
marker.ApplyMarkers();
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]);
}
sheet.DeleteRow(10000);
marker.ApplyMarkers();
MW
Melba Winshia
Syncfusion Team
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:
http://websamples.syncfusion.com/samples/XlsIO.Web/5.2.0.25/I38292_1/main.htm
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,
Melba
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:
http://websamples.syncfusion.com/samples/XlsIO.Web/5.2.0.25/I38292_1/main.htm
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,
Melba
SIGN IN To post a reply.
- 4 Replies
- 2 Participants
-
GD gdo
- Oct 16, 2007 07:36 AM UTC
- Oct 26, 2007 02:52 PM UTC