From: John Yeung <gallium.arsen...@gmail.com>
Date: Wed, 30 Dec 2009 23:47:58 -0500
Local: Wed, Dec 30 2009 11:47 pm
Subject: Re: [pyxl] Bug in row.height ?
On Wed, Dec 30, 2009 at 10:10 PM, John Machin <sjmac...@lexicon.net> wrote: Yeah, pretty much. (I suppose an admonition not to expect behavior B >> As a vague idea (weaker than a suggestion), it might be easier, or at >> least less cryptic, to add a Row.set_height method and point people to >> it in the tutorial, than to explain in the tutorial that they have to >> set both height and height_mismatch. > Your vague idea covers behaviour A, leaving the tutorial to explain that if you use the set_height method is part of the etc.) > Your proposed method would do nothing else but set the height I was thinking (and keep in mind I've not proven myself smarter than a > attribute to the arg value and setting height_mismatch to 1. Do > you plan on not documenting why height_mismatch is set to 1? > Perhaps you'd like to explain what you mean by "easier" and > "less cryptic". bricked and kicked horse) that it would take less verbiage (easier) and be more readily understandable (less cryptic) to the uninitiated reader for the tutorial to say "set the row height to a fixed number of twips using Row.set_height" than to even mention height_mismatch at all. I'll admit I haven't given much thought to cases where it would be nice to have easy access to height_mismatch other than to set a fixed row height. I doubt I would miss it if this property were not exposed in the API at all, but then I'm sure that would break someone else's code. I would document the height setter method, including why it's setting It probably also goes without saying that it's both easier and less ws.row(r).set_height(h) than ws.row(r).height = h or to bundle away the latter in his own function or module. Or to >> Oh, it might be useful to mention that the reason I was investigating I actually didn't find your message cryptic at all, once I was in the >> setting the row height in the first place was because I couldn't coax >> Excel into doing automatic height adjustment to accommodate wrapped >> text in merged cells. > I presume you didn't read far enough into that cryptic message proper frame of mind to pay attention to it. I wasn't in the proper frame of mind initially because I was thinking to myself that I wasn't having the problem that the OP was having, so it wouldn't do me much good to read on. (I guess at the time I was being a less-curious, get-the-job-done type.) Once I did read on, I did see the mention of the demo script, and I Also, I'm sure you're referring to the write_merge toward the end of def merge(sheet, r1, c1, r2, c2, label, style): >> (As far as I can tell, this is a bug in Excel I can't get the Excel UI to automatically accommodate wrapped text in >> 2000 and doesn't imply any deficiency in xlwt.) > Can you produce the required behaviour using the Excel UI? merged cells, which is why I figured it was an Excel bug, and not a problem with xlwt. However, it is also entirely possible that my Excel-fu is simply insufficient. John Y. You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||