sheet.UsedRange.End.Row error

I've brought this up before but never really got it fixed. See attached zip file.

Both sheet.UsedRange.End.Row and sheet.row.length gives me = 364.

But the actual row# of the last line should be 240.

Why is sheet.UsedRange.End.Row and sheet.row.length giving me 364 when it should be 240?



ex.zip

5 Replies

YG Yavanaarasi G Syncfusion Team May 7, 2008 12:45 PM UTC

Hi Mia,

Thank you for your interest in Syncfusion products.

I am able to see the issue that you have mentioned. "UsedRange" property is used to get the range of used cells or edited cells on a worksheet. This issue is reproduced that you have to edit or formatting the 366 rows. Here I have to delete some rows and check it shows correctly. But we have logged a feature request regarding to return used range only for data not for formatting. We will submit this to our developers for further analysis and get back to you with a status update in 2 days.

Please check the Usedrange property with new sheet and let me know if the issue still exists .

Regards,
G.Yavana




BP Bhuvaneswari P Syncfusion Team May 9, 2008 05:36 AM UTC

Hi Mia,

The timeline for this feature is around 1-2months and this will be available in our next major release. We will get back to you once this feature is implemented.

Please let me know if you have any concern.

Best Regards,
Bhuvana




ML Mia Lee May 1, 2009 06:57 PM UTC

I am still noticing this bug in version 7.1. Any ideas when it will be fixed?

>Hi Mia,

The timeline for this feature is around 1-2months and this will be available in our next major release. We will get back to you once this feature is implemented.

Please let me know if you have any concern.

Best Regards,
Bhuvana






AI Amal Ibrahim June 19, 2009 06:35 PM UTC

Use Range.LastRow to get the last row that has data and it will work.
it is a delete versus clear issue in Excel


GM Geetha M Syncfusion Team July 7, 2009 02:35 PM UTC

Hi Mia,

The sheet.UsedRange.End.Row and sheet.row.length returns 364 as there are few cells with no data but

formatting present in the sheet. Inorder to get the last row of data cells, please use the code snippet given below:

sheet.UsedRangeIncludesFormatting = false;
MessageBox.Show(sheet.UsedRange.LastRow.ToString());

Please try this and let me know if you have any questions.

Regards,
Geetha

Loader.
Up arrow icon