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

Problem with InsertColumn (v4.402, VS 2005, framework 2.0.50727)

I'm having a problem inserting a column into an XlsIo worksheet. The error detail is in the attached text file. When I have a value of nCol of 4 in the following code I get the error. The sheet is instantiated and has been written to in column 3. I want to capture the formatting in column 3 and put that into column 4 with an insert operation.

// insert a new column
if (nCol > 3)
{
sheet.InsertColumn( nCol, 1, ExcelInsertOptions.FormatAsBefore );
}

The error message is "Specified argument was out of the range of valid values.\rParameter name: FirstRow"

Any suggestions to get this to work?

error detail.zip

1 Reply

MW Melba Winshia Syncfusion Team February 27, 2007 06:39 AM UTC

Hi Ron,

Thanks for your interest in Essential XlsIO.

I am afraid. I was not able to reproduce the issue [Specified argument was out of the range of valid values]. Here is the test sample that I used to test this issue.

InsertRow.zip

Here is the output file generated with out any exception:

Sample.xls

Could you please take a look at the sample above and kindly let me know if you still find any problem, if not could you please modify this sample so that I can reproduce the issue or could you please send the template file used in this case? This would help me in investigating this issue further.

Thanks,
Melba

Loader.
Live Chat Icon For mobile
Up arrow icon