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

Help me What is wrong in this code?

Thread ID:





83465 Jun 25,2009 10:51 AM UTC Jun 26,2009 11:13 AM UTC WinForms 1
Tags: XlsIO
Asked On June 25, 2009 10:51 AM UTC

Help me. What is wrong in this code?

oWBook = application.Workbooks.Open(strTemplate & "\RPT\SALEANDPROFIT02.xls")
oSheet1 = oWBook.Worksheets("Sheet1")
oSheet2 = oWBook.Worksheets.AddCopy(oWBook.Worksheets(0))
oSheet2.Name = ddlmaker.SelectedValue

[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]
System.Collections.ArrayList.get_Item(Int32 index) +2776237
Syncfusion.XlsIO.Implementation.Collections.WorksheetsCollection.get_Item(Int32 Index) +71
PRT_SALEANDPROFITBYCARLINE.btnSubmit_Click(Object sender, EventArgs e) +409
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105

Geetha M [Syncfusion]
Replied On June 26, 2009 11:13 AM UTC


Thank you for your interest in Syncfusion products.

I am afraid that I am not able to see the problem. Could you please send us the Excel file that throws the exception and details of the Essential Studio version you are currently running?



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

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