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.

sheet.UsedRange.End.Row error

Thread ID:

Created:

Updated:

Platform:

Replies:

73402 May 5,2008 06:11 PM Jul 7,2009 10:35 AM ASP.NET Web Forms (Classic) 5
loading
Tags: XlsIO
Mia Lee
Asked On May 5, 2008 06:11 PM

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

Yavanaarasi G [Syncfusion]
Replied On May 7, 2008 08:45 AM

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



Bhuvaneswari P [Syncfusion]
Replied On May 9, 2008 01:36 AM

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



Mia Lee
Replied On May 1, 2009 02:57 PM

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





Amal Ibrahim
Replied On June 19, 2009 02:35 PM

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

Geetha M [Syncfusion]
Replied On July 7, 2009 10:35 AM

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

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.

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.

;