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.

Row height

Thread ID:

Created:

Updated:

Platform:

Replies:

13399 Apr 27,2004 05:12 PM May 13,2004 01:30 PM Windows Forms 4
loading
Tags: XlsIO
Greg
Asked On April 27, 2004 05:12 PM

I don''t always get the correct Rowheight, often only getting Double.MinValue. I was hoping to not only get the height, but see that a height of zero means the row (same for column/columnwidth) is hidden. foreach(IRange rowset in wk.Rows) { rowset.RowHeight; } Attached is an example xls file that I hope the next version can duplicate. It is not showing the Double.Minvalue, but still incorrect on rowheight. Thanks, Greg rowheight_8676.zip

Administrator [Syncfusion]
Replied On April 30, 2004 05:59 AM

Hi Greg, I read the row heights from the sample spreadsheet that you had sent. The values it returned were 20.25 14.25 (Hidden Row) 14.25 28.5 If i understand your requirements correctly, you need to check if a row/column is hidden? Would that be sufficient or do you want "0" to be returned as rowheight whenever a row is hidden? Can you give more info on instances where the row height returned is incorrect. I will also look in this issue.Sorry for the inconvenience. Thanks. Best regards, Stephen. >I don''t always get the correct Rowheight, often only getting Double.MinValue. I was hoping to not only get the height, but see that a height of zero means the row (same for column/columnwidth) is hidden. > >foreach(IRange rowset in wk.Rows) >{ > rowset.RowHeight; >} > >Attached is an example xls file that I hope the next version can duplicate. It is not showing the Double.Minvalue, but still incorrect on rowheight. > >Thanks, >Greg > >rowheight_8676.zip > >

Greg
Replied On April 30, 2004 07:12 PM

I imagine that the height of a hidden row is maintained (not zeroed out) because a user can unhide it, which would restore it to its previous size. So it seems that the better answer would be a .Hidden property for rows and columns. If my assumption is incorrect, then size of 0 would be fine. Thanks, Greg

Greg
Replied On April 30, 2004 07:18 PM

Stephen, In the example in this thread, I see a single column (column 1), but it has a bogus MinValue for .ColumnWidth. Am I supposed to be interpreting MinValue as something special?? (i.e. is there another property somewhere that I should be looking at instead, like MinValue means look at some .DefaultColumnWidth?) foreach(IRange colset in wk.Columns) { colset.Column; colset.ColumnWidth; } -Greg

Greg
Replied On May 13, 2004 01:30 PM

Stephen, I figured out our communication problem. You must be asking for the worksheet.Range[row,col] (or A1) then the height or width, while I was asking for the worksheet.Rows[i].RowHeight value. So apparently the root Rows[] and Columns[] dimensions are always bogus. I''d classify that as a problem. There should never be a reason to tell it which row that you want to know a column width for, so I''d be surprised that users would be able to use the height and width without an example showing this "odd" calling sequence.

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.

;