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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Help me What is wrong in this code?

Thread ID:

Created:

Updated:

Platform:

Replies:

83465 Jun 25,2009 10:51 AM UTC Jun 26,2009 11:13 AM UTC Windows Forms 1
loading
Tags: XlsIO
winij
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
oSheet2.Activate()


ERROR :
[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

Hi,

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?

Regards,
Geetha

CONFIRMATION

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.

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

;