Row height

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

4 Replies

AD Administrator Syncfusion Team April 30, 2004 09:59 AM UTC

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 > >


GR Greg April 30, 2004 11:12 PM UTC

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


GR Greg April 30, 2004 11:18 PM UTC

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


GR Greg May 13, 2004 05:30 PM UTC

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.

Loader.
Up arrow icon