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

Worksheet.Rows property throws ArgumentOutOfRangeException

Thread ID:





69485 Oct 30,2007 03:11 AM UTC Oct 31,2007 09:24 AM UTC WinForms 2
Tags: XlsIO
Terence Rossow
Asked On October 30, 2007 03:11 AM UTC

Hi there,

I'm using some code we wrote on version 3 of the Syncfusion libraries to export a GridControl to Excel (using XlsIO or ExcelRW as I think it was called at the time). It worked like a charm back then. I haven't really visited this since then, but I'm back now, and we've upgraded to version 5 of SF. Now I'm getting some strange exception on the IWorksheet.Rows property.

We create the sheet using the ExcelEngine.Excel.Workbooks.Create(count) function, and then reference the sheet lower down. But as soon as the sheet is created, referencing the Rows property shows an exception - and not with the index value passed to Rows - something is happening in the code in the Rows property.

I use similar code elsewhere that works fine - but in that code I do not pass a number of sheets to the Workbooks.Create() function - I simply call the default function.

Any ideas would be most appreciated.


Terence Rossow
Replied On October 30, 2007 03:11 AM UTC

Should have mentioned - Visual Studio 2005, Syncfusion


Rajarajeswari S [Syncfusion]
Replied On October 31, 2007 09:24 AM UTC

Hi Terry,

Thanks for using Syncfusion proucts.

I am afraid that i am not able to reproduce the problem that you have mentioned here. Please refer to the following steps that i tried to reproduce it.

1. I have created a sample in XlsIo.
2. I have created workbook by calling the Create(count) method.
3. I have also used the Rows property to make first row to become bold.
4. It works fine here.

Please refer the below code snippet which illustrates this.

IWorkbook workbook = application.Workbooks.Create(3);
IWorksheet sheet = workbook.Worksheets[0];
sheet.Range["A1"].Text = "hello world";
sheet.Rows[0].CellStyle.Font.Bold = true;

Also i have created a simple sample to test this problem and it is available in the following link.


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



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